@@ -143,7 +143,7 @@ |
||
| 143 | 143 | /** |
| 144 | 144 | * Returns the path to a provided file within the Flare package. |
| 145 | 145 | * |
| 146 | - * @param boolean $fiepath |
|
| 146 | + * @param boolean $filepath |
|
| 147 | 147 | * |
| 148 | 148 | * @return string |
| 149 | 149 | */ |
@@ -149,6 +149,6 @@ |
||
| 149 | 149 | */ |
| 150 | 150 | private function basePath($filepath = false) |
| 151 | 151 | { |
| 152 | - return __DIR__.'/../' . $filepath; |
|
| 152 | + return __DIR__ . '/../' . $filepath; |
|
| 153 | 153 | } |
| 154 | 154 | } |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace LaravelFlare\Flare; |
| 4 | 4 | |
| 5 | -use Illuminate\Routing\Router; |
|
| 6 | 5 | use LaravelFlare\Flare\Admin\Attributes\BaseAttribute; |
| 7 | 6 | |
| 8 | 7 | class Flare |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | return $this->config[$key]; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - return config('flare.'.$key); |
|
| 104 | + return config('flare.' . $key); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | public function relativeAdminUrl($path = '') |
| 215 | 215 | { |
| 216 | - return rtrim($this->getRelativeAdminUrl().'/'.$path, '/'); |
|
| 216 | + return rtrim($this->getRelativeAdminUrl() . '/' . $path, '/'); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | public function docsUrl($path = '') |
| 253 | 253 | { |
| 254 | - return url('#'.$path); |
|
| 254 | + return url('#' . $path); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | /** |
@@ -350,10 +350,10 @@ discard block |
||
| 350 | 350 | if ($this->attributeTypeExists($field['type'])) { |
| 351 | 351 | $fieldType = $this->resolveAttributeClass($field['type']); |
| 352 | 352 | |
| 353 | - return call_user_func_array([new $fieldType($attribute, $field, $model, $modelManager), camel_case('render_'.$action)], []); |
|
| 353 | + return call_user_func_array([new $fieldType($attribute, $field, $model, $modelManager), camel_case('render_' . $action)], []); |
|
| 354 | 354 | } |
| 355 | 355 | |
| 356 | - return call_user_func_array([new BaseAttribute($attribute, $field, $model, $modelManager), camel_case('render_'.$action)], []); |
|
| 356 | + return call_user_func_array([new BaseAttribute($attribute, $field, $model, $modelManager), camel_case('render_' . $action)], []); |
|
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | /** |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | */ |
| 366 | 366 | protected function resolveAttributeClass($type) |
| 367 | 367 | { |
| 368 | - $fullClassname = array_key_exists(title_case($type).'Attribute', $this->availableAttributes()) ? $this->availableAttributes()[title_case($type).'Attribute'] : false; |
|
| 368 | + $fullClassname = array_key_exists(title_case($type) . 'Attribute', $this->availableAttributes()) ? $this->availableAttributes()[title_case($type) . 'Attribute'] : false; |
|
| 369 | 369 | |
| 370 | 370 | if (!$fullClassname || !class_exists($fullClassname)) { |
| 371 | 371 | return false; |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | /** |
| 99 | 99 | * Returns the Application Instance. |
| 100 | 100 | * |
| 101 | - * @return mixed |
|
| 101 | + * @return \Illuminate\Foundation\Application |
|
| 102 | 102 | */ |
| 103 | 103 | public function app() |
| 104 | 104 | { |
@@ -5,11 +5,6 @@ |
||
| 5 | 5 | use Illuminate\Support\ServiceProvider; |
| 6 | 6 | use LaravelFlare\Flare\Console\Commands\MakeUserCommand; |
| 7 | 7 | use LaravelFlare\Flare\Console\Commands\MakeAdminCommand; |
| 8 | -use LaravelFlare\Flare\Console\Commands\Generators\ModelAdminMakeCommand; |
|
| 9 | -use LaravelFlare\Flare\Console\Commands\Generators\ModuleAdminMakeCommand; |
|
| 10 | -use LaravelFlare\Flare\Console\Commands\Generators\WidgetAdminMakeCommand; |
|
| 11 | -use LaravelFlare\Flare\Console\Commands\Generators\ModelAdminControllerMakeCommand; |
|
| 12 | -use LaravelFlare\Flare\Console\Commands\Generators\ModuleAdminControllerMakeCommand; |
|
| 13 | 8 | |
| 14 | 9 | class ArtisanServiceProvider extends ServiceProvider |
| 15 | 10 | { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | ], |
| 95 | 95 | function ($router) { |
| 96 | 96 | \Flare::admin()->registerRoutes($router); |
| 97 | - $router->get('/', $this->namespace.'\AdminController@getDashboard')->name('dashboard'); |
|
| 97 | + $router->get('/', $this->namespace . '\AdminController@getDashboard')->name('dashboard'); |
|
| 98 | 98 | } |
| 99 | 99 | ); |
| 100 | 100 | } |
@@ -125,20 +125,20 @@ discard block |
||
| 125 | 125 | function ($router) { |
| 126 | 126 | // Login route if set to show... |
| 127 | 127 | if (\Flare::show('login')) { |
| 128 | - $router->get('login', $this->namespace.'\AdminController@getLogin')->name('login'); |
|
| 129 | - $router->post('login', $this->namespace.'\AdminController@postLogin')->name('login'); |
|
| 128 | + $router->get('login', $this->namespace . '\AdminController@getLogin')->name('login'); |
|
| 129 | + $router->post('login', $this->namespace . '\AdminController@postLogin')->name('login'); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | // Logout route... |
| 133 | - $router->get('logout', $this->namespace.'\AdminController@getLogout')->name('logout'); |
|
| 133 | + $router->get('logout', $this->namespace . '\AdminController@getLogout')->name('logout'); |
|
| 134 | 134 | |
| 135 | 135 | // Password reset link request routes... |
| 136 | - $router->get('email', $this->namespace.'\AdminController@getEmail')->name('email'); |
|
| 137 | - $router->post('email', $this->namespace.'\AdminController@postEmail')->name('email'); |
|
| 136 | + $router->get('email', $this->namespace . '\AdminController@getEmail')->name('email'); |
|
| 137 | + $router->post('email', $this->namespace . '\AdminController@postEmail')->name('email'); |
|
| 138 | 138 | |
| 139 | 139 | // Password reset routes... |
| 140 | - $router->get('reset/{token}', $this->namespace.'\AdminController@getReset')->name('reset'); |
|
| 141 | - $router->post('reset', $this->namespace.'\AdminController@postReset')->name('reset'); |
|
| 140 | + $router->get('reset/{token}', $this->namespace . '\AdminController@getReset')->name('reset'); |
|
| 141 | + $router->post('reset', $this->namespace . '\AdminController@postReset')->name('reset'); |
|
| 142 | 142 | } |
| 143 | 143 | ); |
| 144 | 144 | } |