@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function index() |
| 23 | 23 | { |
| 24 | - return Admin::content(function (Content $content) { |
|
| 24 | + return Admin::content(function(Content $content) { |
|
| 25 | 25 | $content->header(trans('admin::lang.administrator')); |
| 26 | 26 | $content->description(trans('admin::lang.list')); |
| 27 | 27 | $content->body($this->grid()->render()); |
@@ -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.administrator')); |
| 42 | 42 | $content->description(trans('admin::lang.edit')); |
| 43 | 43 | $content->body($this->form()->edit($id)); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function create() |
| 53 | 53 | { |
| 54 | - return Admin::content(function (Content $content) { |
|
| 54 | + return Admin::content(function(Content $content) { |
|
| 55 | 55 | $content->header(trans('admin::lang.administrator')); |
| 56 | 56 | $content->description(trans('admin::lang.create')); |
| 57 | 57 | $content->body($this->form()); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | protected function grid() |
| 67 | 67 | { |
| 68 | - return Admin::grid(Administrator::class, function (Grid $grid) { |
|
| 68 | + return Admin::grid(Administrator::class, function(Grid $grid) { |
|
| 69 | 69 | $grid->id('ID')->sortable(); |
| 70 | 70 | $grid->username(trans('admin::lang.username')); |
| 71 | 71 | $grid->name(trans('admin::lang.name')); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function form() |
| 84 | 84 | { |
| 85 | - return Admin::form(Administrator::class, function (Form $form) { |
|
| 85 | + return Admin::form(Administrator::class, function(Form $form) { |
|
| 86 | 86 | $form->display('id', 'ID'); |
| 87 | 87 | |
| 88 | 88 | $form->text('username', trans('admin::lang.username')); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $form->display('created_at', trans('admin::lang.created_at')); |
| 95 | 95 | $form->display('updated_at', trans('admin::lang.updated_at')); |
| 96 | 96 | |
| 97 | - $form->saving(function (Form $form) { |
|
| 97 | + $form->saving(function(Form $form) { |
|
| 98 | 98 | if ($form->password && $form->model()->password != $form->password) { |
| 99 | 99 | $form->password = bcrypt($form->password); |
| 100 | 100 | } |
@@ -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,28 +21,28 @@ 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.role_users_table'), function (Blueprint $table) { |
|
| 38 | + Schema::create(config('admin.database.role_users_table'), function(Blueprint $table) { |
|
| 39 | 39 | $table->integer('role_id'); |
| 40 | 40 | $table->integer('user_id'); |
| 41 | 41 | $table->index(['role_id', 'user_id']); |
| 42 | 42 | $table->timestamps(); |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | - Schema::create(config('admin.database.role_permissions_table'), function (Blueprint $table) { |
|
| 45 | + Schema::create(config('admin.database.role_permissions_table'), function(Blueprint $table) { |
|
| 46 | 46 | $table->integer('role_id'); |
| 47 | 47 | $table->integer('permission_id'); |
| 48 | 48 | $table->index(['role_id', 'permission_id']); |