@@ -41,8 +41,8 @@ |
||
| 41 | 41 | |
| 42 | 42 | protected function getUpdateRules() |
| 43 | 43 | { |
| 44 | - $key = \Request::get($this->model->getKeyName()); |
|
| 45 | - static::$rules_update['initials'] = 'required|unique:roles,initials' . $key; |
|
| 44 | + $key = \Request::get($this->model->getKeyName()); |
|
| 45 | + static::$rules_update['initials'] = 'required|unique:roles,initials'.$key; |
|
| 46 | 46 | |
| 47 | 47 | return parent::getUpdateRules(); |
| 48 | 48 | } |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Distilleries\Expendable\Exporter\CsvExporter; |
| 4 | 4 | use Distilleries\Expendable\Exporter\ExcelExporter; |
| 5 | -use Distilleries\Expendable\Exporter\PdfExporter; |
|
| 6 | -use Distilleries\Expendable\Http\Router\Router; |
|
| 7 | 5 | use Distilleries\Expendable\Importer\CsvImporter; |
| 8 | 6 | use Distilleries\Expendable\Importer\XlsImporter; |
| 9 | 7 | use Distilleries\Expendable\Layouts\LayoutManager; |
@@ -30,22 +30,22 @@ discard block |
||
| 30 | 30 | public function boot() |
| 31 | 31 | { |
| 32 | 32 | |
| 33 | - $this->loadViewsFrom(__DIR__ . '/../../views', 'expendable'); |
|
| 34 | - $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'expendable'); |
|
| 35 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/'); |
|
| 33 | + $this->loadViewsFrom(__DIR__.'/../../views', 'expendable'); |
|
| 34 | + $this->loadTranslationsFrom(__DIR__.'/../../lang', 'expendable'); |
|
| 35 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations/'); |
|
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | $this->publishes([ |
| 39 | - __DIR__ . '/../../config/config.php' => config_path('expendable.php'), |
|
| 40 | - __DIR__ . '/../../database/seeds/' => base_path('/database/seeds'), |
|
| 39 | + __DIR__.'/../../config/config.php' => config_path('expendable.php'), |
|
| 40 | + __DIR__.'/../../database/seeds/' => base_path('/database/seeds'), |
|
| 41 | 41 | ]); |
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | $this->publishes([ |
| 45 | - __DIR__ . '/../../views' => base_path('resources/views/vendor/expendable'), |
|
| 45 | + __DIR__.'/../../views' => base_path('resources/views/vendor/expendable'), |
|
| 46 | 46 | ], 'views'); |
| 47 | 47 | $this->mergeConfigFrom( |
| 48 | - __DIR__ . '/../../config/config.php', 'expendable' |
|
| 48 | + __DIR__.'/../../config/config.php', 'expendable' |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | $autoLoaderListener = new \Distilleries\Expendable\Register\ListenerAutoLoader(config('expendable.listener')); |
@@ -128,13 +128,13 @@ discard block |
||
| 128 | 128 | protected function registerCommands() |
| 129 | 129 | { |
| 130 | 130 | $file = app('files'); |
| 131 | - $files = $file->allFiles(__DIR__ . '/Console/'); |
|
| 131 | + $files = $file->allFiles(__DIR__.'/Console/'); |
|
| 132 | 132 | |
| 133 | 133 | foreach ($files as $file) |
| 134 | 134 | { |
| 135 | 135 | if (strpos($file->getPathName(), 'Lib') === false) |
| 136 | 136 | { |
| 137 | - $this->commands('Distilleries\Expendable\Console\\' . preg_replace('/\.php/i', '', $file->getFilename())); |
|
| 137 | + $this->commands('Distilleries\Expendable\Console\\'.preg_replace('/\.php/i', '', $file->getFilename())); |
|
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | parent::__construct($layoutManager); |
| 30 | 30 | |
| 31 | - $this->auth = $auth; |
|
| 31 | + $this->auth = $auth; |
|
| 32 | 32 | |
| 33 | 33 | } |
| 34 | 34 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | public function getLoginRedirect() |
| 40 | 40 | { |
| 41 | - return redirect()->action('\\' . self::class . '@getIndex'); |
|
| 41 | + return redirect()->action('\\'.self::class.'@getIndex'); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | public function getIndex() |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | ); |
| 209 | 209 | |
| 210 | 210 | |
| 211 | - $response = $this->broker()->reset($credentials, function ($user, $password) { |
|
| 211 | + $response = $this->broker()->reset($credentials, function($user, $password) { |
|
| 212 | 212 | $user->password = bcrypt($password); |
| 213 | 213 | $user->save(); |
| 214 | 214 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | return redirect()->back()->with('error', trans($response)); |
| 230 | 230 | |
| 231 | 231 | case \Password::PASSWORD_RESET: |
| 232 | - return redirect()->to(action('\\' . get_class($this) . '@getIndex')); |
|
| 232 | + return redirect()->to(action('\\'.get_class($this).'@getIndex')); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | // First, we will check to see if a controller prefix has been registered in |
| 43 | 43 | // the route group. If it has, we will need to prefix it before trying to |
| 44 | 44 | // reflect into the class instance and pull out the method for routing. |
| 45 | - if (! empty($this->groupStack)) { |
|
| 45 | + if (!empty($this->groupStack)) { |
|
| 46 | 46 | $prepended = $this->prependGroupUses($controller); |
| 47 | 47 | } |
| 48 | 48 | $routable = (new ControllerInspector) |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @param \Illuminate\Http\Request $request |
| 22 | 22 | * @param \Closure $next |
| 23 | - * @return mixed |
|
| 23 | + * @return \Illuminate\Http\RedirectResponse |
|
| 24 | 24 | */ |
| 25 | 25 | public function handle($request, Closure $next) |
| 26 | 26 | { |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | preg_match_all('/(\W|^)([a-z]{2})([^a-z]|$)/six', $request->server->get('HTTP_ACCEPT_LANGUAGE'), $m, PREG_PATTERN_ORDER); |
| 29 | 29 | |
| 30 | 30 | $user_langs = $m[2]; |
| 31 | - if (! empty($user_langs[0])) { |
|
| 31 | + if (!empty($user_langs[0])) { |
|
| 32 | 32 | $total = Language::where('iso', '=', $user_langs[0])->count(); |
| 33 | 33 | if ($total > 0) { |
| 34 | 34 | return redirect()->to('/'.$user_langs[0]); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function handle($request, Closure $next) |
| 25 | 25 | { |
| 26 | 26 | |
| 27 | - if (! $request->isSecure() and env('SECURE_COOKIE', false)) { |
|
| 27 | + if (!$request->isSecure() and env('SECURE_COOKIE', false)) { |
|
| 28 | 28 | if (strpos($request->getRequestUri(), '/storage/') === false) { |
| 29 | 29 | return redirect()->secure($request->getRequestUri()); |
| 30 | 30 | } |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | if (config('cache.enabled') === true) { |
| 19 | 19 | $url = $request->url(); |
| 20 | 20 | |
| 21 | - $key = md5($url . json_encode($request->query())); |
|
| 22 | - $value = \Cache::remember($key, config('cache.minutes'), function () use ($next, $request) { |
|
| 21 | + $key = md5($url.json_encode($request->query())); |
|
| 22 | + $value = \Cache::remember($key, config('cache.minutes'), function() use ($next, $request) { |
|
| 23 | 23 | return $next($request); |
| 24 | 24 | }); |
| 25 | 25 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function storagePath() |
| 32 | 32 | { |
| 33 | - $path = env('STORAGE_PATH', $this->basePath . DIRECTORY_SEPARATOR . 'storage'); |
|
| 33 | + $path = env('STORAGE_PATH', $this->basePath.DIRECTORY_SEPARATOR.'storage'); |
|
| 34 | 34 | |
| 35 | 35 | return $this->storagePath ?: $path; |
| 36 | 36 | } |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | \Route::group([ |
| 57 | 57 | 'middleware' => 'web', |
| 58 | 58 | 'namespace' => $this->namespace, |
| 59 | - ], function ($router) { |
|
| 59 | + ], function($router) { |
|
| 60 | 60 | |
| 61 | - require __DIR__ . '/../routes/web.php'; |
|
| 61 | + require __DIR__.'/../routes/web.php'; |
|
| 62 | 62 | }); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | 'middleware' => 'api', |
| 76 | 76 | 'namespace' => $this->namespace, |
| 77 | 77 | 'prefix' => 'api', |
| 78 | - ], function ($router) { |
|
| 79 | - require __DIR__ . '/../routes/api.php'; |
|
| 78 | + ], function($router) { |
|
| 79 | + require __DIR__.'/../routes/api.php'; |
|
| 80 | 80 | }); |
| 81 | 81 | } |
| 82 | 82 | } |