@@ -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 |
@@ -86,8 +84,7 @@ discard block |
||
86 | 84 | * File Link Routes |
87 | 85 | * |
88 | 86 | */ |
89 | - Route::prefix('links')->name('links.')->group(function() |
|
90 | - { |
|
87 | + Route::prefix('links')->name('links.')->group(function() { |
|
91 | 88 | // Resource controllers for base access |
92 | 89 | Route::resource('data', 'FileLinks\FileLinksController'); |
93 | 90 | Route::get('find/{id}', 'FileLinks\FileLinksController@find')->name('user'); |
@@ -115,8 +112,7 @@ discard block |
||
115 | 112 | * System Routes |
116 | 113 | * |
117 | 114 | */ |
118 | - Route::prefix('system')->name('system.')->group(function() |
|
119 | - { |
|
115 | + Route::prefix('system')->name('system.')->group(function() { |
|
120 | 116 | Route::post('system-files/replace', 'Systems\SystemFilesController@replace')->name('replaceFile'); |
121 | 117 | Route::resource('system-files', 'Systems\SystemFilesController'); |
122 | 118 | Route::get('{cat}/{sys}', 'Systems\SystemsController@details')->name('details'); |
@@ -139,8 +135,7 @@ discard block |
||
139 | 135 | * Customer Routes |
140 | 136 | * |
141 | 137 | */ |
142 | - Route::prefix('customer')->name('customer.')->group(function() |
|
143 | - { |
|
138 | + Route::prefix('customer')->name('customer.')->group(function() { |
|
144 | 139 | |
145 | 140 | Route::get('search-id/{id}', 'CustomerController@searchID')->name('searchID'); |
146 | 141 | Route::get('file-types', 'CustomerFilesController@getFileTypes')->name('getFileTypes'); |
@@ -162,12 +157,10 @@ discard block |
||
162 | 157 | * Administration Routes |
163 | 158 | * |
164 | 159 | */ |
165 | - Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() |
|
166 | - { |
|
160 | + Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() { |
|
167 | 161 | |
168 | 162 | |
169 | - Route::prefix('admin')->name('admin.')->group(function() |
|
170 | - { |
|
163 | + Route::prefix('admin')->name('admin.')->group(function() { |
|
171 | 164 | // Admin User File Links routes |
172 | 165 | Route::get('links/show/{id}', 'Admin\AdminController@showLinks')->name('userLinks'); |
173 | 166 | Route::get('count-links', 'Admin\AdminController@countLinks')->name('countLinks'); |
@@ -197,10 +190,8 @@ discard block |
||
197 | 190 | * Installer Routes |
198 | 191 | * |
199 | 192 | */ |
200 | - Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() |
|
201 | - { |
|
202 | - Route::prefix('installer')->name('installer.')->group(function() |
|
203 | - { |
|
193 | + Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() { |
|
194 | + Route::prefix('installer')->name('installer.')->group(function() { |
|
204 | 195 | // User Settings |
205 | 196 | Route::get('user-security-settings', 'Installer\SettingsController@userSecurity')->name('userSecurity'); |
206 | 197 | Route::post('user-security-settings', 'Installer\SettingsController@submitUserSecurity')->name('userSecurity'); |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | |
5 | -$factory->define(App\Customers::class, function (Faker $faker) { |
|
5 | +$factory->define(App\Customers::class, function(Faker $faker) { |
|
6 | 6 | return [ |
7 | 7 | // |
8 | 8 | 'cust_id' => rand(50, 5000), |
@@ -25,12 +25,12 @@ |
||
25 | 25 | ], |
26 | 26 | 'paths' => [ |
27 | 27 | 'default' => env('DFLT_FOLDER', DIRECTORY_SEPARATOR.'default'), |
28 | - 'systems' => env('SYS_FOLDER', DIRECTORY_SEPARATOR.'systems'), |
|
28 | + 'systems' => env('SYS_FOLDER', DIRECTORY_SEPARATOR.'systems'), |
|
29 | 29 | 'customers' => env('CUST_FOLDER', DIRECTORY_SEPARATOR.'customers'), |
30 | 30 | 'users' => env('USER_FOLDER', DIRECTORY_SEPARATOR.'users'), |
31 | - 'tips' => env('TIP_FOLDER', DIRECTORY_SEPARATOR.'tips'), |
|
31 | + 'tips' => env('TIP_FOLDER', DIRECTORY_SEPARATOR.'tips'), |
|
32 | 32 | 'links' => env('LINK_FOLDER', DIRECTORY_SEPARATOR.'links'), |
33 | 33 | 'company' => env('COMP_FOLDER', DIRECTORY_SEPARATOR.'company'), |
34 | - 'max_size' => env('MAX_UPLOAD', ini_get('post_max_size')), |
|
34 | + 'max_size' => env('MAX_UPLOAD', ini_get('post_max_size')), |
|
35 | 35 | ], |
36 | 36 | ]; |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | use Illuminate\Support\Str; |
5 | 5 | |
6 | -$factory->define(App\User::class, function (Faker $faker) { |
|
6 | +$factory->define(App\User::class, function(Faker $faker) { |
|
7 | 7 | return [ |
8 | 8 | 'username' => $faker->unique()->lastName, |
9 | 9 | 'first_name' => $faker->firstName, |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use Illuminate\Support\Str; |
4 | 4 | use Faker\Generator as Faker; |
5 | 5 | |
6 | -$factory->define(App\FileLinks::class, function (Faker $faker) { |
|
6 | +$factory->define(App\FileLinks::class, function(Faker $faker) { |
|
7 | 7 | return [ |
8 | 8 | 'user_id' => 1, |
9 | 9 | 'cust_id' => null, |
@@ -63,7 +63,7 @@ |
||
63 | 63 | { |
64 | 64 | $hash = strtolower(Str::random(15)); |
65 | 65 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
66 | - }while($dup != 0); |
|
66 | + } while($dup != 0); |
|
67 | 67 | |
68 | 68 | // If the "customer id" field is populated, separate the ID from the name and prepare for insertion. |
69 | 69 | if($request->customer_tag != null) |
@@ -51,10 +51,10 @@ |
||
51 | 51 | |
52 | 52 | UserSettings::where('user_id', $userID)->update( |
53 | 53 | [ |
54 | - 'em_tech_tip' => $request->em_tech_tip === 'on' ? true : false, |
|
55 | - 'em_file_link' => $request->em_file_link === 'on' ? true : false, |
|
54 | + 'em_tech_tip' => $request->em_tech_tip === 'on' ? true : false, |
|
55 | + 'em_file_link' => $request->em_file_link === 'on' ? true : false, |
|
56 | 56 | 'em_notification' => $request->em_notification === 'on' ? true : false, |
57 | - 'auto_del_link' => $request->auto_del_link === 'on' ? true : false, |
|
57 | + 'auto_del_link' => $request->auto_del_link === 'on' ? true : false, |
|
58 | 58 | ]); |
59 | 59 | |
60 | 60 | Log::info('User Info Updated', ['user_id' => Auth::user()->user_id]); |
@@ -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 | /** |