You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
5.1 KiB
166 lines
5.1 KiB
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class AdminMenuSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
//
|
|
DB::table('admin_menu')->insert($this->data());
|
|
}
|
|
|
|
private function data(): array
|
|
{
|
|
$not_datetime = get_datetime();
|
|
return [
|
|
[
|
|
'id' => 1,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '模式管理',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 2,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '车位状态',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 3,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '特别车位管理',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 4,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '信息中心',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 5,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '统计报表',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 6,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '设备管理',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 7,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '系统管理',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 8,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '用户管理',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 9,
|
|
'parent_id' => 0,
|
|
'order' => 0,
|
|
'title' => '角色管理',
|
|
'icon' => '',
|
|
'uri' => '',
|
|
'show' => 1,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 10,
|
|
'parent_id' => 8,
|
|
'order' => 0,
|
|
'title' => '只读',
|
|
'icon' => '',
|
|
'uri' => 'users.index',
|
|
'show' => 0,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 11,
|
|
'parent_id' => 8,
|
|
'order' => 0,
|
|
'title' => '查看',
|
|
'icon' => '',
|
|
'uri' => 'users.show',
|
|
'show' => 0,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 12,
|
|
'parent_id' => 8,
|
|
'order' => 0,
|
|
'title' => '添加',
|
|
'icon' => '',
|
|
'uri' => 'users.store',
|
|
'show' => 0,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 13,
|
|
'parent_id' => 8,
|
|
'order' => 0,
|
|
'title' => '编辑',
|
|
'icon' => '',
|
|
'uri' => 'users.update',
|
|
'show' => 0,
|
|
'created_at' => $not_datetime
|
|
],
|
|
[
|
|
'id' => 14,
|
|
'parent_id' => 8,
|
|
'order' => 0,
|
|
'title' => '删除',
|
|
'icon' => '',
|
|
'uri' => 'users.destroy',
|
|
'show' => 0,
|
|
'created_at' => $not_datetime
|
|
],
|
|
];
|
|
}
|
|
}
|
|
|