@@ -66,9 +66,9 @@ 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 | if ((config('admin.route.prefix-permission-ignore') !== null) && (config('admin.route.prefix-permission-ignore') === false)) { |
71 | - $path = trim(config('admin.route.prefix'), '/') . $path; |
|
71 | + $path = trim(config('admin.route.prefix'), '/').$path; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | if (Str::contains($path, ':')) { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | return false; |
115 | 115 | } |
116 | 116 | |
117 | - $method = collect($match['method'])->filter()->map(function ($method) { |
|
117 | + $method = collect($match['method'])->filter()->map(function($method) { |
|
118 | 118 | return strtoupper($method); |
119 | 119 | }); |
120 | 120 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | { |
155 | 155 | parent::boot(); |
156 | 156 | |
157 | - static::deleting(function ($model) { |
|
157 | + static::deleting(function($model) { |
|
158 | 158 | $model->roles()->detach(); |
159 | 159 | }); |
160 | 160 | } |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | $grid->slug(trans('admin.slug')); |
91 | 91 | $grid->name(trans('admin.name')); |
92 | 92 | |
93 | - $grid->http_path(trans('admin.route'))->display(function ($path) { |
|
94 | - return collect(explode("\n", $path))->map(function ($path) { |
|
93 | + $grid->http_path(trans('admin.route'))->display(function($path) { |
|
94 | + return collect(explode("\n", $path))->map(function($path) { |
|
95 | 95 | $method = $this->http_method ?: ['ANY']; |
96 | 96 | |
97 | 97 | if (Str::contains($path, ':')) { |
@@ -99,15 +99,15 @@ discard block |
||
99 | 99 | $method = explode(',', $method); |
100 | 100 | } |
101 | 101 | |
102 | - $method = collect($method)->map(function ($name) { |
|
102 | + $method = collect($method)->map(function($name) { |
|
103 | 103 | return strtoupper($name); |
104 | - })->map(function ($name) { |
|
104 | + })->map(function($name) { |
|
105 | 105 | return "<span class='label label-primary'>{$name}</span>"; |
106 | 106 | })->implode(' '); |
107 | 107 | |
108 | 108 | if (!empty(config('admin.route.prefix'))) { |
109 | 109 | if ((config('admin.route.prefix-permission-ignore') !== null) && (config('admin.route.prefix-permission-ignore') === false)) { |
110 | - $path = '/' . trim(config('admin.route.prefix'), '/') . $path; |
|
110 | + $path = '/'.trim(config('admin.route.prefix'), '/').$path; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | $grid->created_at(trans('admin.created_at')); |
119 | 119 | $grid->updated_at(trans('admin.updated_at')); |
120 | 120 | |
121 | - $grid->tools(function (Grid\Tools $tools) { |
|
122 | - $tools->batch(function (Grid\Tools\BatchActions $actions) { |
|
121 | + $grid->tools(function(Grid\Tools $tools) { |
|
122 | + $tools->batch(function(Grid\Tools\BatchActions $actions) { |
|
123 | 123 | $actions->disableDelete(); |
124 | 124 | }); |
125 | 125 | }); |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | $show->slug(trans('admin.slug')); |
145 | 145 | $show->name(trans('admin.name')); |
146 | 146 | |
147 | - $show->http_path(trans('admin.route'))->as(function ($path) { |
|
148 | - return collect(explode("\r\n", $path))->map(function ($path) { |
|
147 | + $show->http_path(trans('admin.route'))->as(function($path) { |
|
148 | + return collect(explode("\r\n", $path))->map(function($path) { |
|
149 | 149 | $method = $this->http_method ?: ['ANY']; |
150 | 150 | |
151 | 151 | if (Str::contains($path, ':')) { |
@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | $method = explode(',', $method); |
154 | 154 | } |
155 | 155 | |
156 | - $method = collect($method)->map(function ($name) { |
|
156 | + $method = collect($method)->map(function($name) { |
|
157 | 157 | return strtoupper($name); |
158 | - })->map(function ($name) { |
|
158 | + })->map(function($name) { |
|
159 | 159 | return "<span class='label label-primary'>{$name}</span>"; |
160 | 160 | })->implode(' '); |
161 | 161 |