'admin_basics', 'title' => '后台基础接口', 'icon' => '', 'pid' => '0', 'type' => '1', 'check_type' => '1', 'show' => '2', ], [ 'name' => 'admin_basics_login', 'title' => '后台登录', 'icon' => '', 'pid' => '1', 'type' => '2', 'check_type' => '1', 'show' => '2', ], [ 'name' => 'admin_basics_status', 'title' => '后台登录状态', 'icon' => '', 'pid' => '1', 'type' => '2', 'check_type' => '1', 'show' => '2', ]]; foreach ($data as $datum) { $auth = new App\Models\Auth(); $auth->name = $datum['name']; $auth->title = $datum['title']; $auth->icon = $datum['icon']; $auth->pid = $datum['pid']; $auth->type = $datum['type']; $auth->check_type = $datum['check_type']; $auth->show = $datum['show']; $auth->status = 1; $auth->del = 2; $auth->order = 0; $auth->save(); } } /** * Reverse the migrations. * * @return void */ public function down() { // } }