@@ -235,10 +235,10 @@ |
||
235 | 235 | 'middleware' => config('admin.route.middleware'), |
236 | 236 | ]; |
237 | 237 | |
238 | - Route::group($attributes, function ($router) { |
|
238 | + Route::group($attributes, function($router) { |
|
239 | 239 | |
240 | 240 | /* @var \Illuminate\Routing\Router $router */ |
241 | - $router->group([], function ($router) { |
|
241 | + $router->group([], function($router) { |
|
242 | 242 | |
243 | 243 | /* @var \Illuminate\Routing\Router $router */ |
244 | 244 | $router->resource('auth/users', 'UserController'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | return $next($request); |
22 | 22 | } |
23 | 23 | |
24 | - if (!Admin::user()->allPermissions()->first(function ($permission) use ($request) { |
|
24 | + if (!Admin::user()->allPermissions()->first(function($permission) use ($request) { |
|
25 | 25 | return $permission->shouldPassThrough($request); |
26 | 26 | })) { |
27 | 27 | \Encore\Admin\Auth\Permission::error(); |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $callback = $this->actionsCallback; |
435 | 435 | $column = $this->addColumn('__actions__', trans('admin.action')); |
436 | 436 | |
437 | - $column->display(function ($value) use ($grid, $column, $callback) { |
|
437 | + $column->display(function($value) use ($grid, $column, $callback) { |
|
438 | 438 | $actions = new Actions($value, $grid, $column, $this); |
439 | 439 | |
440 | 440 | return $actions->display($callback); |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | */ |
449 | 449 | public function disableRowSelector() |
450 | 450 | { |
451 | - $this->tools(function ($tools) { |
|
451 | + $this->tools(function($tools) { |
|
452 | 452 | /* @var Grid\Tools $tools */ |
453 | 453 | $tools->disableBatchActions(); |
454 | 454 | }); |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $column = new Column(Column::SELECT_COLUMN_NAME, ' '); |
473 | 473 | $column->setGrid($this); |
474 | 474 | |
475 | - $column->display(function ($value) use ($grid, $column) { |
|
475 | + $column->display(function($value) use ($grid, $column) { |
|
476 | 476 | $actions = new RowSelector($value, $grid, $column, $this); |
477 | 477 | |
478 | 478 | return $actions->display(); |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | |
500 | 500 | Column::setOriginalGridData($data); |
501 | 501 | |
502 | - $this->columns->map(function (Column $column) use (&$data) { |
|
502 | + $this->columns->map(function(Column $column) use (&$data) { |
|
503 | 503 | $data = $column->fill($data); |
504 | 504 | |
505 | 505 | $this->columnNames[] = $column->getName(); |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | */ |
578 | 578 | protected function buildRows(array $data) |
579 | 579 | { |
580 | - $this->rows = collect($data)->map(function ($model, $number) { |
|
580 | + $this->rows = collect($data)->map(function($model, $number) { |
|
581 | 581 | return new Row($number, $model); |
582 | 582 | }); |
583 | 583 |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | * Get or set option for grid. |
229 | 229 | * |
230 | 230 | * @param string $key |
231 | - * @param mixed $value |
|
231 | + * @param boolean $value |
|
232 | 232 | * |
233 | 233 | * @return $this|mixed |
234 | 234 | */ |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | /** |
359 | 359 | * Get the grid paginator. |
360 | 360 | * |
361 | - * @return mixed |
|
361 | + * @return Tools\Paginator |
|
362 | 362 | */ |
363 | 363 | public function paginator() |
364 | 364 | { |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | * |
723 | 723 | * @param Closure|null $closure |
724 | 724 | * |
725 | - * @return $this|Tools\Footer |
|
725 | + * @return callable |
|
726 | 726 | */ |
727 | 727 | public function footer(Closure $closure = null) |
728 | 728 | { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | $connection = config('admin.database.connection') ?: config('database.default'); |
16 | 16 | |
17 | - Schema::connection($connection)->create(config('admin.database.users_table'), function (Blueprint $table) { |
|
17 | + Schema::connection($connection)->create(config('admin.database.users_table'), function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->string('username', 190)->unique(); |
20 | 20 | $table->string('password', 60); |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | $table->timestamps(); |
24 | 24 | }); |
25 | 25 | |
26 | - Schema::connection($connection)->create(config('admin.database.roles_table'), function (Blueprint $table) { |
|
26 | + Schema::connection($connection)->create(config('admin.database.roles_table'), function(Blueprint $table) { |
|
27 | 27 | $table->increments('id'); |
28 | 28 | $table->string('name', 50)->unique(); |
29 | 29 | $table->string('slug', 50); |
30 | 30 | $table->timestamps(); |
31 | 31 | }); |
32 | 32 | |
33 | - Schema::connection($connection)->create(config('admin.database.permissions_table'), function (Blueprint $table) { |
|
33 | + Schema::connection($connection)->create(config('admin.database.permissions_table'), function(Blueprint $table) { |
|
34 | 34 | $table->increments('id'); |
35 | 35 | $table->string('name', 50)->unique(); |
36 | 36 | $table->string('slug', 50); |
37 | 37 | $table->timestamps(); |
38 | 38 | }); |
39 | 39 | |
40 | - Schema::connection($connection)->create(config('admin.database.menu_table'), function (Blueprint $table) { |
|
40 | + Schema::connection($connection)->create(config('admin.database.menu_table'), function(Blueprint $table) { |
|
41 | 41 | $table->increments('id'); |
42 | 42 | $table->integer('parent_id')->default(0); |
43 | 43 | $table->integer('order')->default(0); |
@@ -48,35 +48,35 @@ discard block |
||
48 | 48 | $table->timestamps(); |
49 | 49 | }); |
50 | 50 | |
51 | - Schema::connection($connection)->create(config('admin.database.role_users_table'), function (Blueprint $table) { |
|
51 | + Schema::connection($connection)->create(config('admin.database.role_users_table'), function(Blueprint $table) { |
|
52 | 52 | $table->integer('role_id'); |
53 | 53 | $table->integer('user_id'); |
54 | 54 | $table->index(['role_id', 'user_id']); |
55 | 55 | $table->timestamps(); |
56 | 56 | }); |
57 | 57 | |
58 | - Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function (Blueprint $table) { |
|
58 | + Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function(Blueprint $table) { |
|
59 | 59 | $table->integer('role_id'); |
60 | 60 | $table->integer('permission_id'); |
61 | 61 | $table->index(['role_id', 'permission_id']); |
62 | 62 | $table->timestamps(); |
63 | 63 | }); |
64 | 64 | |
65 | - Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function (Blueprint $table) { |
|
65 | + Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function(Blueprint $table) { |
|
66 | 66 | $table->integer('user_id'); |
67 | 67 | $table->integer('permission_id'); |
68 | 68 | $table->index(['user_id', 'permission_id']); |
69 | 69 | $table->timestamps(); |
70 | 70 | }); |
71 | 71 | |
72 | - Schema::connection($connection)->create(config('admin.database.role_menu_table'), function (Blueprint $table) { |
|
72 | + Schema::connection($connection)->create(config('admin.database.role_menu_table'), function(Blueprint $table) { |
|
73 | 73 | $table->integer('role_id'); |
74 | 74 | $table->integer('menu_id'); |
75 | 75 | $table->index(['role_id', 'menu_id']); |
76 | 76 | $table->timestamps(); |
77 | 77 | }); |
78 | 78 | |
79 | - Schema::connection($connection)->create(config('admin.database.operation_log_table'), function (Blueprint $table) { |
|
79 | + Schema::connection($connection)->create(config('admin.database.operation_log_table'), function(Blueprint $table) { |
|
80 | 80 | $table->increments('id'); |
81 | 81 | $table->integer('user_id'); |
82 | 82 | $table->string('path'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | @if($errors->hasBag('exception')) |
2 | - <?php $error = $errors->getBag('exception');?> |
|
2 | + <?php $error = $errors->getBag('exception'); ?> |
|
3 | 3 | <div class="alert alert-warning alert-dismissable"> |
4 | 4 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
5 | 5 | <h4> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | @if(Session::has('error')) |
2 | - <?php $error = Session::get('error');?> |
|
2 | + <?php $error = Session::get('error'); ?> |
|
3 | 3 | <div class="alert alert-danger alert-dismissable"> |
4 | 4 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
5 | 5 | <h4><i class="icon fa fa-ban"></i>{{ array_get($error->get('title'), 0) }}</h4> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | @if(Session::has('success')) |
2 | - <?php $success = Session::get('success');?> |
|
2 | + <?php $success = Session::get('success'); ?> |
|
3 | 3 | <div class="alert alert-success alert-dismissable"> |
4 | 4 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
5 | 5 | <h4><i class="icon fa fa-check"></i>{{ array_get($success->get('title'), 0) }}</h4> |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * |
34 | 34 | * @param int $id |
35 | 35 | * |
36 | - * @return \Illuminate\Http\Response |
|
36 | + * @return \Illuminate\Http\JsonResponse |
|
37 | 37 | */ |
38 | 38 | public function destroy($id) |
39 | 39 | { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | protected static function routes($callback) |
25 | 25 | { |
26 | 26 | /* @var \Illuminate\Routing\Router $router */ |
27 | - Route::group(['prefix' => config('admin.route.prefix')], function ($router) use ($callback) { |
|
27 | + Route::group(['prefix' => config('admin.route.prefix')], function($router) use ($callback) { |
|
28 | 28 | $attributes = array_merge([ |
29 | 29 | 'middleware' => config('admin.route.middleware'), |
30 | 30 | ], static::config('route', [])); |