@@ -89,7 +89,7 @@ |
||
| 89 | 89 | $fields = \DB::getSchemaBuilder()->getColumnListing($table); |
| 90 | 90 | $fields = array_diff($fields, $exceptFields); |
| 91 | 91 | |
| 92 | - $array = \DB::table($table)->get($fields)->map(function ($item) { |
|
| 92 | + $array = \DB::table($table)->get($fields)->map(function($item) { |
|
| 93 | 93 | return (array) $item; |
| 94 | 94 | })->all(); |
| 95 | 95 | |
@@ -640,7 +640,7 @@ |
||
| 640 | 640 | } |
| 641 | 641 | |
| 642 | 642 | /* Build row elements */ |
| 643 | - $template = array_reduce($fields, function ($all, $field) { |
|
| 643 | + $template = array_reduce($fields, function($all, $field) { |
|
| 644 | 644 | $all .= "<td>{$field}</td>"; |
| 645 | 645 | |
| 646 | 646 | return $all; |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | protected function startColumn() |
| 113 | 113 | { |
| 114 | 114 | // get class name using width array |
| 115 | - $classnName = collect($this->width)->map(function ($value, $key) { |
|
| 115 | + $classnName = collect($this->width)->map(function($value, $key) { |
|
| 116 | 116 | return "col-$key-$value"; |
| 117 | 117 | })->implode(' '); |
| 118 | 118 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | @if($errors->hasBag('exception') && config('app.debug') == true) |
| 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> |
@@ -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; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | return collect($excepts) |
| 89 | 89 | ->map('admin_base_path') |
| 90 | - ->contains(function ($except) use ($request) { |
|
| 90 | + ->contains(function($except) use ($request) { |
|
| 91 | 91 | if ($except !== '/') { |
| 92 | 92 | $except = trim($except, '/'); |
| 93 | 93 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | return collect($excepts) |
| 45 | 45 | ->map('admin_base_path') |
| 46 | - ->contains(function ($except) use ($request) { |
|
| 46 | + ->contains(function($except) use ($request) { |
|
| 47 | 47 | if ($except !== '/') { |
| 48 | 48 | $except = trim($except, '/'); |
| 49 | 49 | } |
@@ -209,7 +209,7 @@ |
||
| 209 | 209 | $values = $this->original[$key]; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - $this->fields->each(function (Field $field) use ($values) { |
|
| 212 | + $this->fields->each(function(Field $field) use ($values) { |
|
| 213 | 213 | $field->setOriginal($values); |
| 214 | 214 | }); |
| 215 | 215 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | $this->overwriteExistingField($name); |
| 224 | 224 | |
| 225 | - return tap($field, function ($field) { |
|
| 225 | + return tap($field, function($field) { |
|
| 226 | 226 | $this->fields->push($field); |
| 227 | 227 | }); |
| 228 | 228 | } |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | $this->overwriteExistingRelation($name); |
| 246 | 246 | |
| 247 | - return tap($relation, function ($relation) { |
|
| 247 | + return tap($relation, function($relation) { |
|
| 248 | 248 | $this->relations->push($relation); |
| 249 | 249 | }); |
| 250 | 250 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | $this->fields = $this->fields->filter( |
| 264 | - function (Field $field) use ($name) { |
|
| 264 | + function(Field $field) use ($name) { |
|
| 265 | 265 | return $field->getName() != $name; |
| 266 | 266 | } |
| 267 | 267 | ); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | $this->relations = $this->relations->filter( |
| 282 | - function (Relation $relation) use ($name) { |
|
| 282 | + function(Relation $relation) use ($name) { |
|
| 283 | 283 | return $relation->getName() != $name; |
| 284 | 284 | } |
| 285 | 285 | ); |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | */ |
| 337 | 337 | public function setWidth($fieldWidth = 8, $labelWidth = 2) |
| 338 | 338 | { |
| 339 | - collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
| 339 | + collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) { |
|
| 340 | 340 | $field->each->setWidth($fieldWidth, $labelWidth); |
| 341 | 341 | }); |
| 342 | 342 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | $eagerLoads = array_keys($this->getQuery()->getEagerLoads()); |
| 51 | 51 | |
| 52 | - $columns = collect($columns)->reject(function ($column) use ($eagerLoads) { |
|
| 52 | + $columns = collect($columns)->reject(function($column) use ($eagerLoads) { |
|
| 53 | 53 | return Str::contains($column, '.') || in_array($column, $eagerLoads); |
| 54 | 54 | }); |
| 55 | 55 | |