更新至5.1.27LTS,编写权限,在添加用户时直接添加角色

This commit is contained in:
巴掌 committed 2018-10-24 16:08:03 +08:00
1 parent 378b60cbf6
commit f4f4fe1d67
39 files changed
+535 -367

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
use think\migration\Seeder;
class Admin 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()
{
// 初始化超级管理员
$rows[] = [
'id' => 1,
'xingming' => '超级管理员',
'username' => 'admin',
'password' => '$apr1$RSUodBwI$zOhVq9RQWfQDOW2sbeCDS1',
];
// 保存数据
$this->table('admin')->insert($rows)->save();
}
}