@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create(config('admin.database.users_table'), function (Blueprint $table) { |
|
| 15 | + Schema::create(config('admin.database.users_table'), function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('username', 190)->unique(); |
| 18 | 18 | $table->string('password', 60); |
@@ -21,21 +21,21 @@ discard block |
||
| 21 | 21 | $table->timestamps(); |
| 22 | 22 | }); |
| 23 | 23 | |
| 24 | - Schema::create(config('admin.database.roles_table'), function (Blueprint $table) { |
|
| 24 | + Schema::create(config('admin.database.roles_table'), function(Blueprint $table) { |
|
| 25 | 25 | $table->increments('id'); |
| 26 | 26 | $table->string('name', 50)->unique(); |
| 27 | 27 | $table->string('slug', 50); |
| 28 | 28 | $table->timestamps(); |
| 29 | 29 | }); |
| 30 | 30 | |
| 31 | - Schema::create(config('admin.database.permissions_table'), function (Blueprint $table) { |
|
| 31 | + Schema::create(config('admin.database.permissions_table'), function(Blueprint $table) { |
|
| 32 | 32 | $table->increments('id'); |
| 33 | 33 | $table->string('name', 50)->unique(); |
| 34 | 34 | $table->string('slug', 50); |
| 35 | 35 | $table->timestamps(); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - Schema::create(config('admin.database.menu_table'), function (Blueprint $table) { |
|
| 38 | + Schema::create(config('admin.database.menu_table'), function(Blueprint $table) { |
|
| 39 | 39 | $table->increments('id'); |
| 40 | 40 | $table->integer('parent_id')->default(0); |
| 41 | 41 | $table->integer('order'); |
@@ -46,21 +46,21 @@ discard block |
||
| 46 | 46 | $table->timestamps(); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - Schema::create(config('admin.database.role_users_table'), function (Blueprint $table) { |
|
| 49 | + Schema::create(config('admin.database.role_users_table'), function(Blueprint $table) { |
|
| 50 | 50 | $table->integer('role_id'); |
| 51 | 51 | $table->integer('user_id'); |
| 52 | 52 | $table->index(['role_id', 'user_id']); |
| 53 | 53 | $table->timestamps(); |
| 54 | 54 | }); |
| 55 | 55 | |
| 56 | - Schema::create(config('admin.database.role_permissions_table'), function (Blueprint $table) { |
|
| 56 | + Schema::create(config('admin.database.role_permissions_table'), function(Blueprint $table) { |
|
| 57 | 57 | $table->integer('role_id'); |
| 58 | 58 | $table->integer('permission_id'); |
| 59 | 59 | $table->index(['role_id', 'permission_id']); |
| 60 | 60 | $table->timestamps(); |
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | - Schema::create(config('admin.database.role_menu_table'), function (Blueprint $table) { |
|
| 63 | + Schema::create(config('admin.database.role_menu_table'), function(Blueprint $table) { |
|
| 64 | 64 | $table->integer('role_id'); |
| 65 | 65 | $table->integer('menu_id'); |
| 66 | 66 | $table->index(['role_id', 'menu_id']); |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | { |
| 85 | 85 | static::$branchOrder = array_flip(array_flatten($order)); |
| 86 | 86 | |
| 87 | - static::$branchOrder = array_map(function ($item) { |
|
| 87 | + static::$branchOrder = array_map(function($item) { |
|
| 88 | 88 | return ++$item; |
| 89 | 89 | }, static::$branchOrder); |
| 90 | 90 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function index() |
| 22 | 22 | { |
| 23 | - return Admin::content(function (Content $content) { |
|
| 23 | + return Admin::content(function(Content $content) { |
|
| 24 | 24 | $content->header(trans('admin::lang.menu')); |
| 25 | 25 | $content->description(trans('admin::lang.list')); |
| 26 | 26 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function edit($id) |
| 39 | 39 | { |
| 40 | - return Admin::content(function (Content $content) use ($id) { |
|
| 40 | + return Admin::content(function(Content $content) use ($id) { |
|
| 41 | 41 | $content->header(trans('admin::lang.menu')); |
| 42 | 42 | $content->description(trans('admin::lang.edit')); |
| 43 | 43 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function create() |
| 55 | 55 | { |
| 56 | - return Admin::content(function (Content $content) { |
|
| 56 | + return Admin::content(function(Content $content) { |
|
| 57 | 57 | $content->header(trans('admin::lang.menu')); |
| 58 | 58 | $content->description(trans('admin::lang.create')); |
| 59 | 59 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function form() |
| 111 | 111 | { |
| 112 | - return Admin::form(Menu::class, function (Form $form) { |
|
| 112 | + return Admin::form(Menu::class, function(Form $form) { |
|
| 113 | 113 | $form->display('id', 'ID'); |
| 114 | 114 | |
| 115 | 115 | $options = [0 => 'Root'] + Menu::buildSelectOptions(); |