Files
sentos/database/seeds/Users.php
2022-11-14 20:34:53 +08:00

22 lines
571 B
PHP

<?php
use think\migration\Seeder;
class Users extends Seeder
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeders is available here:
* http://docs.phinx.org/en/latest/seeding.html
*/
public function run()
{
$user = array(
array('username' => 'admin', 'password' => password_hash('admin888', PASSWORD_DEFAULT), 'nickname' => '超级管理员', 'email' => 'admin@admin.com')
);
$this->table('users')->insert($user)->save();
}
}