@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if(!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -14,7 +14,8 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (! $request->expectsJson()) |
|
| 18 | + { |
|
| 18 | 19 | return route('login'); |
| 19 | 20 | } |
| 20 | 21 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : ''; |
| 39 | 39 | |
| 40 | 40 | // check for matching file names |
| 41 | - if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
| 41 | + if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
| 42 | 42 | { |
| 43 | 43 | // Have a number; increment it |
| 44 | 44 | $base = $match[1]; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | do |
| 55 | 55 | { |
| 56 | 56 | $fileName = $base.'('.++$number.')'.$extension; |
| 57 | - } while (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)); |
|
| 57 | + } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | return $fileName; |
@@ -38,20 +38,20 @@ |
||
| 38 | 38 | $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : ''; |
| 39 | 39 | |
| 40 | 40 | // check for matching file names |
| 41 | - if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
| 41 | + if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
| 42 | 42 | { |
| 43 | 43 | // Have a number; increment it |
| 44 | 44 | $base = $match[1]; |
| 45 | 45 | $number = intVal($match[2]); |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } |
|
| 47 | + else |
|
| 48 | 48 | { |
| 49 | 49 | // No number; add one |
| 50 | 50 | $base = $fileParts['filename']; |
| 51 | 51 | $number = 0; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - do |
|
| 54 | + do |
|
| 55 | 55 | { |
| 56 | 56 | $fileName = $base.'('.++$number.')'.$extension; |
| 57 | 57 | } while (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)); |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | ->action('Click to View Link', |
| 33 | 33 | url(route('links.details', |
| 34 | 34 | [ |
| 35 | - 'id' => $this->details->link_id, |
|
| 36 | - 'name' => urlencode($this->details->link_name) |
|
| 35 | + 'id' => $this->details->link_id, |
|
| 36 | + 'name' => urlencode($this->details->link_name) |
|
| 37 | 37 | ]))); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | 'type' => 'warning', |
| 45 | 45 | 'message' => 'New File Uploaded to link - '.$this->details->link_name, |
| 46 | 46 | 'link' => url(route('links.details', |
| 47 | - [ |
|
| 47 | + [ |
|
| 48 | 48 | 'id' => $this->details->link_id, |
| 49 | - 'name' => urlencode($this->details->link_name) |
|
| 50 | - ])) |
|
| 49 | + 'name' => urlencode($this->details->link_name) |
|
| 50 | + ])) |
|
| 51 | 51 | ]; |
| 52 | 52 | } |
| 53 | 53 | } |
@@ -16,21 +16,21 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function register() |
| 18 | 18 | { |
| 19 | - try |
|
| 20 | - { |
|
| 21 | - if(Schema::hasTable('settings')) |
|
| 22 | - { |
|
| 23 | - $settings = DB::table('settings')->get(); |
|
| 24 | - foreach($settings as $setting) |
|
| 25 | - { |
|
| 26 | - Config([$setting->key => $setting->value]); |
|
| 27 | - } |
|
| 28 | - } |
|
| 29 | - } |
|
| 30 | - catch(\Illuminate\Database\QueryException $e) |
|
| 31 | - { |
|
| 19 | + try |
|
| 20 | + { |
|
| 21 | + if(Schema::hasTable('settings')) |
|
| 22 | + { |
|
| 23 | + $settings = DB::table('settings')->get(); |
|
| 24 | + foreach($settings as $setting) |
|
| 25 | + { |
|
| 26 | + Config([$setting->key => $setting->value]); |
|
| 27 | + } |
|
| 28 | + } |
|
| 29 | + } |
|
| 30 | + catch(\Illuminate\Database\QueryException $e) |
|
| 31 | + { |
|
| 32 | 32 | |
| 33 | - } |
|
| 33 | + } |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -Artisan::command('inspire', function () { |
|
| 16 | +Artisan::command('inspire', function() { |
|
| 17 | 17 | $this->comment(Inspiring::quote()); |
| 18 | 18 | })->describe('Display an inspiring quote'); |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Broadcast::channel('App.User.{id}', function ($user, $id) { |
|
| 14 | +Broadcast::channel('App.User.{id}', function($user, $id) { |
|
| 15 | 15 | return (int) $user->id === (int) $id; |
| 16 | 16 | }); |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | |
| 124 | 124 | |
| 125 | 125 | |
| 126 | - ///////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 126 | + ///////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 127 | 127 | |
| 128 | 128 | |
| 129 | 129 | |
@@ -54,15 +54,13 @@ discard block |
||
| 54 | 54 | * Logged in user routes |
| 55 | 55 | * |
| 56 | 56 | */ |
| 57 | -Route::middleware(['password_expired'])->group(function() |
|
| 58 | -{ |
|
| 57 | +Route::middleware(['password_expired'])->group(function() { |
|
| 59 | 58 | /* |
| 60 | 59 | * |
| 61 | 60 | * Routes for users with "tech" permissions |
| 62 | 61 | * |
| 63 | 62 | */ |
| 64 | - Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() |
|
| 65 | - { |
|
| 63 | + Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() { |
|
| 66 | 64 | /* |
| 67 | 65 | * |
| 68 | 66 | * Dashboard and About page routes |
@@ -91,8 +89,7 @@ discard block |
||
| 91 | 89 | * File Link Routes |
| 92 | 90 | * |
| 93 | 91 | */ |
| 94 | - Route::prefix('links')->name('links.')->group(function() |
|
| 95 | - { |
|
| 92 | + Route::prefix('links')->name('links.')->group(function() { |
|
| 96 | 93 | // Resource controllers for base access |
| 97 | 94 | Route::resource('data', 'FileLinks\FileLinksController'); |
| 98 | 95 | Route::get('find/{id}', 'FileLinks\FileLinksController@find')->name('user'); |
@@ -133,8 +130,7 @@ discard block |
||
| 133 | 130 | * Customer Routes |
| 134 | 131 | * |
| 135 | 132 | */ |
| 136 | - Route::prefix('customer')->name('customer.')->group(function() |
|
| 137 | - { |
|
| 133 | + Route::prefix('customer')->name('customer.')->group(function() { |
|
| 138 | 134 | |
| 139 | 135 | Route::get('search-id/{id}', 'CustomerController@searchID')->name('searchID'); |
| 140 | 136 | Route::get('file-types', 'CustomerFilesController@getFileTypes')->name('getFileTypes'); |
@@ -156,12 +152,10 @@ discard block |
||
| 156 | 152 | * Administration Routes |
| 157 | 153 | * |
| 158 | 154 | */ |
| 159 | - Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() |
|
| 160 | - { |
|
| 155 | + Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() { |
|
| 161 | 156 | |
| 162 | 157 | |
| 163 | - Route::prefix('admin')->name('admin.')->group(function() |
|
| 164 | - { |
|
| 158 | + Route::prefix('admin')->name('admin.')->group(function() { |
|
| 165 | 159 | Route::get('user/confirm/{id}', 'Admin\UserController@confirm')->name('confirmDisable'); |
| 166 | 160 | Route::get('user/disable', 'Admin\UserController@disable')->name('disable'); |
| 167 | 161 | Route::get('user/change-password/{id}', 'Admin\UserController@changePassword')->name('changePassword'); |