@@ -165,13 +165,13 @@ discard block |
||
165 | 165 | // route explicitly for the developers, so reverse routing is possible. |
166 | 166 | foreach ($routable as $method => $routes) { |
167 | 167 | foreach ($routes as $route) { |
168 | - $action = ['uses' => $controller.'@'.$method]; |
|
168 | + $action = ['uses' => $controller . '@' . $method]; |
|
169 | 169 | |
170 | 170 | \Route::{$route['verb']}($route['uri'], $action); |
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
174 | - \Route::any($uri.'/{_missing}', $controller.'@missingMethod'); |
|
174 | + \Route::any($uri . '/{_missing}', $controller . '@missingMethod'); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | return $this->view; |
242 | 242 | } |
243 | 243 | |
244 | - return 'flare::'.$this->view; |
|
244 | + return 'flare::' . $this->view; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | /** |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | public function getTitle() |
323 | 323 | { |
324 | 324 | if (!isset($this->title) || !$this->title) { |
325 | - return Str::title(str_replace('_', ' ', snake_case(preg_replace('/'.static::CLASS_SUFFIX.'$/', '', static::shortName())))); |
|
325 | + return Str::title(str_replace('_', ' ', snake_case(preg_replace('/' . static::CLASS_SUFFIX . '$/', '', static::shortName())))); |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | return $this->title; |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | */ |
398 | 398 | public function relativeUrl($path = '') |
399 | 399 | { |
400 | - return \Flare::relativeAdminUrl($this->urlPrefix().($path ? '/'.$path : '')); |
|
400 | + return \Flare::relativeAdminUrl($this->urlPrefix() . ($path ? '/' . $path : '')); |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | /** |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | */ |
422 | 422 | public function relativeCurrentUrl($path) |
423 | 423 | { |
424 | - return \Route::current() ? \Route::current()->getPrefix().'/'.$path : null; |
|
424 | + return \Route::current() ? \Route::current()->getPrefix() . '/' . $path : null; |
|
425 | 425 | } |
426 | 426 | |
427 | 427 | /* |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | // If the routable method is an index method, we will create a special index |
49 | 49 | // route which is simply the prefix and the verb and does not contain any |
50 | 50 | // the wildcard place-holders that each "typical" routes would contain. |
51 | - if ($data['plain'] == $prefix.'/index') { |
|
51 | + if ($data['plain'] == $prefix . '/index') { |
|
52 | 52 | $routable[$method->name][] = $this->getIndexData($data, $prefix); |
53 | 53 | } |
54 | 54 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function getPlainUri($name, $prefix) |
122 | 122 | { |
123 | - return $prefix.'/'.implode('-', array_slice(explode('_', Str::snake($name)), 1)); |
|
123 | + return $prefix . '/' . implode('-', array_slice(explode('_', Str::snake($name)), 1)); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
@@ -131,6 +131,6 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function addUriWildcards($uri) |
133 | 133 | { |
134 | - return $uri.'/{one?}/{two?}/{three?}/{four?}/{five?}'; |
|
134 | + return $uri . '/{one?}/{two?}/{three?}/{four?}/{five?}'; |
|
135 | 135 | } |
136 | 136 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | $this->modelAdmin->create(); |
123 | 123 | |
124 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->getTitle().' was successfully created.', 'dismissable' => false]]); |
|
124 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully created.', 'dismissable' => false]]); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | |
176 | 176 | $this->modelAdmin->edit($modelitemId); |
177 | 177 | |
178 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->getTitle().' was successfully updated.', 'dismissable' => false]]); |
|
178 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully updated.', 'dismissable' => false]]); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | $this->modelAdmin->delete($modelitemId); |
217 | 217 | |
218 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->getTitle().' was successfully removed.', 'dismissable' => false]]); |
|
218 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully removed.', 'dismissable' => false]]); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | |
250 | 250 | $this->modelAdmin->restore($modelitemId); |
251 | 251 | |
252 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->getTitle().' was successfully restored.', 'dismissable' => false]]); |
|
252 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully restored.', 'dismissable' => false]]); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |
@@ -267,6 +267,6 @@ discard block |
||
267 | 267 | |
268 | 268 | $this->modelAdmin->clone($modelitemId); |
269 | 269 | |
270 | - return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The '.$this->modelAdmin->getTitle().' was successfully cloned.', 'dismissable' => false]]); |
|
270 | + return redirect($this->modelAdmin->currentUrl())->with('notifications_below_header', [['type' => 'success', 'icon' => 'check-circle', 'title' => 'Success!', 'message' => 'The ' . $this->modelAdmin->getTitle() . ' was successfully cloned.', 'dismissable' => false]]); |
|
271 | 271 | } |
272 | 272 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $view = 'admin.dashboard'; |
56 | 56 | |
57 | 57 | if (!view()->exists($view)) { |
58 | - $view = 'flare::'.$view; |
|
58 | + $view = 'flare::' . $view; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return view($view, ['widgets' => (new WidgetAdminManager())]); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $view = 'admin.dashboard'; |
56 | 56 | |
57 | 57 | if (!view()->exists($view)) { |
58 | - $view = 'flare::'.$view; |
|
58 | + $view = 'flare::' . $view; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return view($view, ['widgets' => (new WidgetAdminManager())]); |