@@ -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'); |
@@ -1,12 +1,12 @@ |
||
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> |
6 | 6 | <p>{!! array_get($error->get('message'), 0) !!}</p> |
7 | 7 | </div> |
8 | 8 | @elseif (Session::has('errors')) |
9 | - <?php $errors = Session::get('errors');?> |
|
9 | + <?php $errors = Session::get('errors'); ?> |
|
10 | 10 | @if ($errors->hasBag('error')) |
11 | 11 | <div class="alert alert-danger alert-dismissable"> |
12 | 12 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | return $next($request); |
34 | 34 | } |
35 | 35 | |
36 | - if (!Admin::user()->allPermissions()->first(function ($permission) use ($request) { |
|
36 | + if (!Admin::user()->allPermissions()->first(function($permission) use ($request) { |
|
37 | 37 | return $permission->shouldPassThrough($request); |
38 | 38 | })) { |
39 | 39 | Checker::error(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function checkRoutePermission(Request $request) |
54 | 54 | { |
55 | - if (!$middleware = collect($request->route()->middleware())->first(function ($middleware) { |
|
55 | + if (!$middleware = collect($request->route()->middleware())->first(function($middleware) { |
|
56 | 56 | return Str::startsWith($middleware, $this->middlewarePrefix); |
57 | 57 | })) { |
58 | 58 | return false; |
@@ -86,7 +86,7 @@ |
||
86 | 86 | { |
87 | 87 | parent::boot(); |
88 | 88 | |
89 | - static::deleting(function ($model) { |
|
89 | + static::deleting(function($model) { |
|
90 | 90 | $model->administrators()->detach(); |
91 | 91 | |
92 | 92 | $model->permissions()->detach(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $method = $this->http_method; |
68 | 68 | |
69 | - $matches = array_map(function ($path) use ($method) { |
|
69 | + $matches = array_map(function($path) use ($method) { |
|
70 | 70 | $path = trim(config('admin.route.prefix'), '/').$path; |
71 | 71 | |
72 | 72 | if (Str::contains($path, ':')) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | return false; |
101 | 101 | } |
102 | 102 | |
103 | - $method = collect($match['method'])->filter()->map(function ($method) { |
|
103 | + $method = collect($match['method'])->filter()->map(function($method) { |
|
104 | 104 | return strtoupper($method); |
105 | 105 | }); |
106 | 106 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | parent::boot(); |
142 | 142 | |
143 | - static::deleting(function ($model) { |
|
143 | + static::deleting(function($model) { |
|
144 | 144 | $model->roles()->detach(); |
145 | 145 | }); |
146 | 146 | } |
@@ -155,7 +155,7 @@ |
||
155 | 155 | { |
156 | 156 | parent::boot(); |
157 | 157 | |
158 | - static::deleting(function ($model) { |
|
158 | + static::deleting(function($model) { |
|
159 | 159 | $model->roles()->detach(); |
160 | 160 | |
161 | 161 | $model->permissions()->detach(); |
@@ -76,7 +76,7 @@ |
||
76 | 76 | { |
77 | 77 | parent::boot(); |
78 | 78 | |
79 | - static::deleting(function ($model) { |
|
79 | + static::deleting(function($model) { |
|
80 | 80 | $model->roles()->detach(); |
81 | 81 | }); |
82 | 82 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $grid = $this->grid; |
411 | 411 | $column = $this; |
412 | 412 | |
413 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
413 | + $this->display(function($value) use ($grid, $column, $class) { |
|
414 | 414 | $definition = new $class($value, $grid, $column, $this); |
415 | 415 | |
416 | 416 | return $definition->display(); |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | protected function htmlEntityEncode($item) |
428 | 428 | { |
429 | 429 | if (is_array($item)) { |
430 | - array_walk_recursive($item, function (&$value) { |
|
430 | + array_walk_recursive($item, function(&$value) { |
|
431 | 431 | $value = htmlentities($value); |
432 | 432 | }); |
433 | 433 | } else { |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | */ |
508 | 508 | protected function callSupportDisplayer($abstract, $arguments) |
509 | 509 | { |
510 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
510 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
511 | 511 | if (is_array($value) || $value instanceof Arrayable) { |
512 | 512 | return call_user_func_array([collect($value), $abstract], $arguments); |
513 | 513 | } |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | protected function callBuiltinDisplayer($abstract, $arguments) |
532 | 532 | { |
533 | 533 | if ($abstract instanceof Closure) { |
534 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
534 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
535 | 535 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
536 | 536 | }); |
537 | 537 | } |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | $grid = $this->grid; |
541 | 541 | $column = $this; |
542 | 542 | |
543 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
543 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
544 | 544 | $displayer = new $abstract($value, $grid, $column, $this); |
545 | 545 | |
546 | 546 | return call_user_func_array([$displayer, 'display'], $arguments); |
@@ -551,14 +551,14 @@ discard block |
||
551 | 551 | } |
552 | 552 | public function setLabel($label) |
553 | 553 | { |
554 | - $trans_key = 'validation.attributes.' . $label; |
|
554 | + $trans_key = 'validation.attributes.'.$label; |
|
555 | 555 | $trans_key_low = strtolower($trans_key); |
556 | 556 | if (Lang::has($trans_key)) { |
557 | 557 | $label = Lang::get($trans_key); |
558 | 558 | } |
559 | 559 | if (Lang::has($trans_key_low)) { |
560 | 560 | $label = Lang::get($trans_key_low); |
561 | - }else { |
|
561 | + } else { |
|
562 | 562 | $label = ucfirst($label); |
563 | 563 | } |
564 | 564 | return $label; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | protected function editAction() |
225 | 225 | { |
226 | - $_edit = trans('admin.edit'); |
|
226 | + $_edit = trans('admin.edit'); |
|
227 | 227 | return <<<EOT |
228 | 228 | <a class="btn btn-xs btn-default" href="{$this->getResource()}/{$this->getKey()}/edit"> |
229 | 229 | <i class="fa fa-edit"></i> $_edit |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | protected function deleteAction() |
236 | 236 | { |
237 | 237 | $this->___deleteAction(); |
238 | - $_delete = trans('admin.delete'); |
|
238 | + $_delete = trans('admin.delete'); |
|
239 | 239 | return <<<EOT |
240 | 240 | <a href="javascript:void(0);" data-id="{$this->getKey()}" class="grid-row-delete btn btn-xs btn-danger"> |
241 | 241 | <i class="fa fa-trash"></i> $_delete |