@@ -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())]); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | if (($methodBreaker = strpos($field, '.')) !== false) { |
243 | 243 | $method = substr($field, 0, $methodBreaker); |
244 | 244 | if (method_exists($this->model, $method)) { |
245 | - if (method_exists($this->model->$method(), $submethod = str_replace($method.'.', '', $field))) { |
|
245 | + if (method_exists($this->model->$method(), $submethod = str_replace($method . '.', '', $field))) { |
|
246 | 246 | $this->model->$method()->$submethod(); |
247 | 247 | |
248 | 248 | $columns[$field] = $fieldTitle; |
@@ -318,13 +318,13 @@ discard block |
||
318 | 318 | $formattedKey = str_replace('.', '_', $key); |
319 | 319 | |
320 | 320 | if ($this->hasGetAccessor($formattedKey)) { |
321 | - $method = 'get'.Str::studly($formattedKey).'Attribute'; |
|
321 | + $method = 'get' . Str::studly($formattedKey) . 'Attribute'; |
|
322 | 322 | |
323 | 323 | return $this->{$method}($model); |
324 | 324 | } |
325 | 325 | |
326 | 326 | if ($this->hasGetAccessor($key)) { |
327 | - $method = 'get'.Str::studly($key).'Attribute'; |
|
327 | + $method = 'get' . Str::studly($key) . 'Attribute'; |
|
328 | 328 | |
329 | 329 | return $this->{$method}($model); |
330 | 330 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | */ |
346 | 346 | public function hasGetAccessor($key) |
347 | 347 | { |
348 | - return method_exists($this, 'get'.Str::studly($key).'Attribute'); |
|
348 | + return method_exists($this, 'get' . Str::studly($key) . 'Attribute'); |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | if (($methodBreaker = strpos($key, '.')) !== false) { |
391 | 391 | $method = substr($key, 0, $methodBreaker); |
392 | 392 | if (method_exists($model, $method)) { |
393 | - if (method_exists($model->$method, $submethod = str_replace($method.'.', '', $key))) { |
|
393 | + if (method_exists($model->$method, $submethod = str_replace($method . '.', '', $key))) { |
|
394 | 394 | return $model->$method->$submethod(); |
395 | 395 | } |
396 | 396 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | public function setAttribute($key, $value) |
415 | 415 | { |
416 | 416 | if ($this->hasSetMutator($key)) { |
417 | - $method = 'set'.Str::studly($key).'Attribute'; |
|
417 | + $method = 'set' . Str::studly($key) . 'Attribute'; |
|
418 | 418 | |
419 | 419 | return $this->{$method}($value); |
420 | 420 | } |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | */ |
432 | 432 | public function hasSetMutator($key) |
433 | 433 | { |
434 | - return method_exists($this, 'set'.Str::studly($key).'Attribute'); |
|
434 | + return method_exists($this, 'set' . Str::studly($key) . 'Attribute'); |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | /** |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | */ |
444 | 444 | public function hasGetMutator($key) |
445 | 445 | { |
446 | - return method_exists($this, 'get'.Str::studly($key).'Attribute'); |
|
446 | + return method_exists($this, 'get' . Str::studly($key) . 'Attribute'); |
|
447 | 447 | } |
448 | 448 | |
449 | 449 | /** |