@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | private function updatePhoneIcons() |
67 | 67 | { |
68 | 68 | $newIcons = [ |
69 | - ['description' => 'Home', 'icon_class' => 'fas fa-home'], |
|
70 | - ['description' => 'Work', 'icon_class' => 'fas fa-briefcase'], |
|
69 | + ['description' => 'Home', 'icon_class' => 'fas fa-home'], |
|
70 | + ['description' => 'Work', 'icon_class' => 'fas fa-briefcase'], |
|
71 | 71 | ['description' => 'Mobile', 'icon_class' => 'fas fa-mobile-alt'], |
72 | 72 | ]; |
73 | 73 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | if(!Schema::hasColumn('users', 'role_id')) |
101 | 101 | { |
102 | - Schema::table('users', function (Blueprint $table) { |
|
102 | + Schema::table('users', function(Blueprint $table) { |
|
103 | 103 | $table->integer('role_id')->after('user_id')->unsigned()->default(4); |
104 | 104 | $table->foreign('role_id')->references('role_id')->on('user_role_descriptions')->onUpdate('cascade'); |
105 | 105 | }); |
@@ -326,8 +326,8 @@ discard block |
||
326 | 326 | // Add soft deletes to tech tips table to prevent accidental deletes |
327 | 327 | private function addSoftDeleteToTechTips() |
328 | 328 | { |
329 | - if (!Schema::hasColumn('tech_tips', 'deleted_at')) { |
|
330 | - Schema::table('tech_tips', function (Blueprint $table) { |
|
329 | + if(!Schema::hasColumn('tech_tips', 'deleted_at')) { |
|
330 | + Schema::table('tech_tips', function(Blueprint $table) { |
|
331 | 331 | $table->softDeletes()->after('description'); |
332 | 332 | }); |
333 | 333 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | // Migrate over all deactivated users |
346 | 346 | DB::update('UPDATE `users` SET `deleted_at` = "'.Carbon::now().'" WHERE `active` = 0'); |
347 | 347 | // Remove the Active column |
348 | - Schema::table('users', function (Blueprint $table) { |
|
348 | + Schema::table('users', function(Blueprint $table) { |
|
349 | 349 | $table->dropColumn('active'); |
350 | 350 | }); |
351 | 351 | } |
@@ -364,27 +364,27 @@ discard block |
||
364 | 364 | } |
365 | 365 | if(!Schema::hasColumn('customer_systems', 'shared')) |
366 | 366 | { |
367 | - Schema::table('customer_systems', function (Blueprint $table) |
|
367 | + Schema::table('customer_systems', function(Blueprint $table) |
|
368 | 368 | { |
369 | 369 | $table->boolean('shared')->default(0)->after('sys_id'); |
370 | 370 | }); |
371 | 371 | } |
372 | - if (!Schema::hasColumn('customer_contacts', 'shared')) |
|
372 | + if(!Schema::hasColumn('customer_contacts', 'shared')) |
|
373 | 373 | { |
374 | - Schema::table('customer_contacts', function (Blueprint $table) |
|
374 | + Schema::table('customer_contacts', function(Blueprint $table) |
|
375 | 375 | { |
376 | 376 | $table->boolean('shared')->default(0)->after('cust_id'); |
377 | 377 | }); |
378 | 378 | } |
379 | - if (!Schema::hasColumn('customer_notes', 'shared')) |
|
379 | + if(!Schema::hasColumn('customer_notes', 'shared')) |
|
380 | 380 | { |
381 | - Schema::table('customer_notes', function (Blueprint $table) |
|
381 | + Schema::table('customer_notes', function(Blueprint $table) |
|
382 | 382 | { |
383 | 383 | $table->boolean('shared')->default(0)->after('user_id'); |
384 | 384 | }); |
385 | 385 | } |
386 | - if (!Schema::hasColumn('customer_files', 'shared')) { |
|
387 | - Schema::table('customer_files', function (Blueprint $table) { |
|
386 | + if(!Schema::hasColumn('customer_files', 'shared')) { |
|
387 | + Schema::table('customer_files', function(Blueprint $table) { |
|
388 | 388 | $table->boolean('shared')->default(0)->after('user_id'); |
389 | 389 | }); |
390 | 390 | } |
@@ -83,7 +83,8 @@ discard block |
||
83 | 83 | // Added the ability to set an expiration date for user passwords - will force them to change after this expires |
84 | 84 | private function addPasswordExpiresColumn() |
85 | 85 | { |
86 | - if(!Schema::hasColumn('users', 'password_expires')) { |
|
86 | + if(!Schema::hasColumn('users', 'password_expires')) |
|
87 | + { |
|
87 | 88 | Schema::table('users', function(Blueprint $table) { |
88 | 89 | $table->timestamp('password_expires') |
89 | 90 | ->nullable() |
@@ -119,7 +120,8 @@ discard block |
||
119 | 120 | // Added a 'hidden' attribute to system customer data types to allow passwords to not be viewed unless clicked or focus |
120 | 121 | private function addHiddenColumn() |
121 | 122 | { |
122 | - if(!Schema::hasColumn('system_data_field_types', 'hidden')) { |
|
123 | + if(!Schema::hasColumn('system_data_field_types', 'hidden')) |
|
124 | + { |
|
123 | 125 | Schema::table('system_cust_data_types', function(Blueprint $table) { |
124 | 126 | $table->boolean('hidden') |
125 | 127 | ->default(0) |
@@ -131,7 +133,8 @@ discard block |
||
131 | 133 | // Update the File links table - add cust_id and note column |
132 | 134 | private function addColumnsToFileLinksTable() |
133 | 135 | { |
134 | - if(!Schema::hasColumn('file_links', 'cust_id')) { |
|
136 | + if(!Schema::hasColumn('file_links', 'cust_id')) |
|
137 | + { |
|
135 | 138 | Schema::table('file_links', function(Blueprint $table) { |
136 | 139 | $table->integer('cust_id') |
137 | 140 | ->unsigned() |
@@ -140,7 +143,8 @@ discard block |
||
140 | 143 | $table->foreign('cust_id')->references('cust_id')->on('customers')->onUpdate('cascade')->onDelete('cascade'); |
141 | 144 | }); |
142 | 145 | } |
143 | - if(!Schema::hasColumn('file_links', 'note')) { |
|
146 | + if(!Schema::hasColumn('file_links', 'note')) |
|
147 | + { |
|
144 | 148 | Schema::table('file_links', function(Blueprint $table) { |
145 | 149 | $table->longText('note') |
146 | 150 | ->nullable() |
@@ -148,7 +152,8 @@ discard block |
||
148 | 152 | }); |
149 | 153 | // Migrate the instructions from the old table to the new column |
150 | 154 | $instructions = DB::select('SELECT * FROM `file_link_instructions`'); |
151 | - foreach($instructions as $ins) { |
|
155 | + foreach($instructions as $ins) |
|
156 | + { |
|
152 | 157 | FileLinks::find($ins->link_id)->update([ |
153 | 158 | 'note' => $ins->instruction |
154 | 159 | ]); |
@@ -159,7 +164,8 @@ discard block |
||
159 | 164 | // Add Notes column to the file links files table |
160 | 165 | private function addNotesColumnToFileLinkFiles() |
161 | 166 | { |
162 | - if(!Schema::hasColumn('file_link_files', 'note')) { |
|
167 | + if(!Schema::hasColumn('file_link_files', 'note')) |
|
168 | + { |
|
163 | 169 | Schema::table('file_link_files', function(Blueprint $table) { |
164 | 170 | $table->longText('note') |
165 | 171 | ->nullable() |
@@ -167,7 +173,8 @@ discard block |
||
167 | 173 | }); |
168 | 174 | // Migrate the existing notes to the new table |
169 | 175 | $notes = DB::select('SELECT * FROM `file_link_notes`'); |
170 | - foreach($notes as $note) { |
|
176 | + foreach($notes as $note) |
|
177 | + { |
|
171 | 178 | FileLinkFiles::where('file_id', $note->file_id)->update([ |
172 | 179 | 'note' => $note->note |
173 | 180 | ]); |
@@ -178,7 +185,8 @@ discard block |
||
178 | 185 | // Add the documentation column to the tech tips table |
179 | 186 | private function migrateSystemDocumentation() |
180 | 187 | { |
181 | - if(!Schema::hasColumn('tech_tips', 'tip_type_id')) { |
|
188 | + if(!Schema::hasColumn('tech_tips', 'tip_type_id')) |
|
189 | + { |
|
182 | 190 | Schema::table('tech_tips', function(Blueprint $table) { |
183 | 191 | $table->bigInteger('tip_type_id')->unsigned()->after('public')->default(1); |
184 | 192 | $table->foreign('tip_type_id')->references('tip_type_id')->on('tech_tip_types')->onUpdate('cascade'); |
@@ -186,7 +194,8 @@ discard block |
||
186 | 194 | |
187 | 195 | // Move all of the system files over to the tech tips table |
188 | 196 | $sysFiles = DB::select('SELECT * FROM `system_files`'); |
189 | - foreach($sysFiles as $sysFile) { |
|
197 | + foreach($sysFiles as $sysFile) |
|
198 | + { |
|
190 | 199 | $newTip = TechTips::create([ |
191 | 200 | 'user_id' => $sysFile->user_id, |
192 | 201 | 'public' => 0, |
@@ -280,7 +289,8 @@ discard block |
||
280 | 289 | // Remove the system files and system file types table |
281 | 290 | private function removeSystemFilesTables() |
282 | 291 | { |
283 | - if(Schema::hasTable('system_files')) { |
|
292 | + if(Schema::hasTable('system_files')) |
|
293 | + { |
|
284 | 294 | Schema::table('system_files', function(Blueprint $table) { |
285 | 295 | $table->dropForeign(['sys_id']); |
286 | 296 | $table->dropForeign(['type_id']); |
@@ -326,7 +336,8 @@ discard block |
||
326 | 336 | // Add soft deletes to tech tips table to prevent accidental deletes |
327 | 337 | private function addSoftDeleteToTechTips() |
328 | 338 | { |
329 | - if (!Schema::hasColumn('tech_tips', 'deleted_at')) { |
|
339 | + if (!Schema::hasColumn('tech_tips', 'deleted_at')) |
|
340 | + { |
|
330 | 341 | Schema::table('tech_tips', function (Blueprint $table) { |
331 | 342 | $table->softDeletes()->after('description'); |
332 | 343 | }); |
@@ -338,8 +349,7 @@ discard block |
||
338 | 349 | { |
339 | 350 | if(!Schema::hasColumn('users', 'deleted_at')) |
340 | 351 | { |
341 | - Schema::table('users', function(Blueprint $table) |
|
342 | - { |
|
352 | + Schema::table('users', function(Blueprint $table) { |
|
343 | 353 | $table->softDeletes()->after('password_expires'); |
344 | 354 | }); |
345 | 355 | // Migrate over all deactivated users |
@@ -356,34 +366,31 @@ discard block |
||
356 | 366 | { |
357 | 367 | if(!Schema::hasColumn('customers', 'parent_id')) |
358 | 368 | { |
359 | - Schema::table('customers', function(Blueprint $table) |
|
360 | - { |
|
369 | + Schema::table('customers', function(Blueprint $table) { |
|
361 | 370 | $table->integer('parent_id')->after('cust_id')->nullable()->unsigned(); |
362 | 371 | $table->foreign('parent_id')->references('cust_id')->on('customers')->onUpdate('cascade'); |
363 | 372 | }); |
364 | 373 | } |
365 | 374 | if(!Schema::hasColumn('customer_systems', 'shared')) |
366 | 375 | { |
367 | - Schema::table('customer_systems', function (Blueprint $table) |
|
368 | - { |
|
376 | + Schema::table('customer_systems', function (Blueprint $table) { |
|
369 | 377 | $table->boolean('shared')->default(0)->after('sys_id'); |
370 | 378 | }); |
371 | 379 | } |
372 | 380 | if (!Schema::hasColumn('customer_contacts', 'shared')) |
373 | 381 | { |
374 | - Schema::table('customer_contacts', function (Blueprint $table) |
|
375 | - { |
|
382 | + Schema::table('customer_contacts', function (Blueprint $table) { |
|
376 | 383 | $table->boolean('shared')->default(0)->after('cust_id'); |
377 | 384 | }); |
378 | 385 | } |
379 | 386 | if (!Schema::hasColumn('customer_notes', 'shared')) |
380 | 387 | { |
381 | - Schema::table('customer_notes', function (Blueprint $table) |
|
382 | - { |
|
388 | + Schema::table('customer_notes', function (Blueprint $table) { |
|
383 | 389 | $table->boolean('shared')->default(0)->after('user_id'); |
384 | 390 | }); |
385 | 391 | } |
386 | - if (!Schema::hasColumn('customer_files', 'shared')) { |
|
392 | + if (!Schema::hasColumn('customer_files', 'shared')) |
|
393 | + { |
|
387 | 394 | Schema::table('customer_files', function (Blueprint $table) { |
388 | 395 | $table->boolean('shared')->default(0)->after('user_id'); |
389 | 396 | }); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ]; |
44 | 44 | } |
45 | 45 | $mods = Module::allDisabled(); |
46 | - foreach ($mods as $name => $mod) { |
|
46 | + foreach($mods as $name => $mod) { |
|
47 | 47 | $moduleList[] = [ |
48 | 48 | 'name' => $name, |
49 | 49 | 'status' => 'Disabled', |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
81 | 81 | |
82 | 82 | // Verify that the upload is valid and being processed |
83 | - if ($receiver->isUploaded() === false) { |
|
84 | - Log::error('Upload File Missing - ' . |
|
83 | + if($receiver->isUploaded() === false) { |
|
84 | + Log::error('Upload File Missing - '. |
|
85 | 85 | /** @scrutinizer ignore-type */ |
86 | 86 | $request->toArray()); |
87 | 87 | throw new UploadMissingFileException(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $save = $receiver->receive(); |
92 | 92 | |
93 | 93 | // See if the uploade has finished |
94 | - if ($save->isFinished()) { |
|
94 | + if($save->isFinished()) { |
|
95 | 95 | $this->saveFile($save->getFile()); |
96 | 96 | |
97 | 97 | return 'uploaded successfully'; |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | // Get the current progress |
101 | 101 | $handler = $save->handler(); |
102 | 102 | |
103 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
104 | - Log::debug('File being uploaded. Percentage done - ' . $handler->getPercentageDone()); |
|
103 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
104 | + Log::debug('File being uploaded. Percentage done - '.$handler->getPercentageDone()); |
|
105 | 105 | return response()->json([ |
106 | 106 | 'done' => $handler->getPercentageDone(), |
107 | 107 | 'status' => true |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | // Save a file attached to the link |
113 | 113 | private function saveFile(UploadedFile $file) |
114 | 114 | { |
115 | - $filePath = config('filesystems.disks.staging.root') . DIRECTORY_SEPARATOR . 'modules'.DIRECTORY_SEPARATOR; |
|
115 | + $filePath = config('filesystems.disks.staging.root').DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR; |
|
116 | 116 | |
117 | 117 | // Clean the file and store it |
118 | 118 | $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName()); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $module->extract(config('modules.paths.modules').DIRECTORY_SEPARATOR.$modName); |
136 | 136 | $module->close(); |
137 | 137 | |
138 | - Artisan::call('module:enable', ['module' => $modName]); |
|
138 | + Artisan::call('module:enable', ['module' => $modName]); |
|
139 | 139 | Artisan::call('module:migrate', ['module' => $modName]); |
140 | 140 | $this->delStaged($name); |
141 | 141 |
@@ -43,7 +43,8 @@ discard block |
||
43 | 43 | ]; |
44 | 44 | } |
45 | 45 | $mods = Module::allDisabled(); |
46 | - foreach ($mods as $name => $mod) { |
|
46 | + foreach ($mods as $name => $mod) |
|
47 | + { |
|
47 | 48 | $moduleList[] = [ |
48 | 49 | 'name' => $name, |
49 | 50 | 'status' => 'Disabled', |
@@ -80,7 +81,8 @@ discard block |
||
80 | 81 | $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
81 | 82 | |
82 | 83 | // Verify that the upload is valid and being processed |
83 | - if ($receiver->isUploaded() === false) { |
|
84 | + if ($receiver->isUploaded() === false) |
|
85 | + { |
|
84 | 86 | Log::error('Upload File Missing - ' . |
85 | 87 | /** @scrutinizer ignore-type */ |
86 | 88 | $request->toArray()); |
@@ -91,7 +93,8 @@ discard block |
||
91 | 93 | $save = $receiver->receive(); |
92 | 94 | |
93 | 95 | // See if the uploade has finished |
94 | - if ($save->isFinished()) { |
|
96 | + if ($save->isFinished()) |
|
97 | + { |
|
95 | 98 | $this->saveFile($save->getFile()); |
96 | 99 | |
97 | 100 | return 'uploaded successfully'; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | SystemDataFields::create([ |
58 | 58 | 'sys_id' => $sys->sys_id, |
59 | 59 | 'data_type_id' => $i, |
60 | - 'order' => $i-1, |
|
60 | + 'order' => $i - 1, |
|
61 | 61 | ]); |
62 | 62 | } |
63 | 63 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use App\Customers; |
6 | 6 | use Faker\Generator as Faker; |
7 | 7 | |
8 | -$factory->define(Customers::class, function (Faker $faker) { |
|
8 | +$factory->define(Customers::class, function(Faker $faker) { |
|
9 | 9 | return [ |
10 | 10 | 'cust_id' => $faker->unique()->numberBetween(50, 10000), |
11 | 11 | 'parent_id' => null, |
@@ -10,7 +10,7 @@ |
||
10 | 10 | 'first_name' => $faker->firstName, |
11 | 11 | 'last_name' => $faker->lastName, |
12 | 12 | 'email' => $faker->unique()->safeEmail, |
13 | - 'password' => bcrypt('password'), // All test users will have the password of 'password' to allow testing access |
|
13 | + 'password' => bcrypt('password'), // All test users will have the password of 'password' to allow testing access |
|
14 | 14 | 'remember_token' => Str::random(10), |
15 | 15 | 'password_expires' => null, |
16 | 16 | ]; |
@@ -42,8 +42,7 @@ discard block |
||
42 | 42 | /* |
43 | 43 | * File Link Routes |
44 | 44 | */ |
45 | -Route::prefix('links')->name('links.')->group(function () |
|
46 | -{ |
|
45 | +Route::prefix('links')->name('links.')->group(function () { |
|
47 | 46 | // Resource controllers for base access |
48 | 47 | Route::resource('data', 'FileLinks\FileLinksController'); |
49 | 48 | Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | /* |
69 | 68 | * Customer Routes |
70 | 69 | */ |
71 | -Route::prefix('customer')->name('customer.')->group(function() |
|
72 | -{ |
|
70 | +Route::prefix('customer')->name('customer.')->group(function() { |
|
73 | 71 | // Customer Files |
74 | 72 | Route::resource('files', 'Customers\CustomerFilesController'); |
75 | 73 | // Custome Notes |
@@ -97,8 +95,7 @@ discard block |
||
97 | 95 | */ |
98 | 96 | Route::resource('tips', 'TechTips\TechTipsController'); |
99 | 97 | Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
100 | -Route::prefix('tip')->name('tip.')->group(function() |
|
101 | -{ |
|
98 | +Route::prefix('tip')->name('tip.')->group(function() { |
|
102 | 99 | Route::resource('comments', 'TechTips\TechTipCommentsController'); |
103 | 100 | Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
104 | 101 | Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
@@ -110,11 +107,9 @@ discard block |
||
110 | 107 | /* |
111 | 108 | * Administration Routes |
112 | 109 | */ |
113 | -Route::prefix('admin')->name('admin.')->group(function () |
|
114 | -{ |
|
110 | +Route::prefix('admin')->name('admin.')->group(function () { |
|
115 | 111 | // Routes for Tech Bench Add-ons |
116 | - Route::prefix('modules')->name('module.')->group(function() |
|
117 | - { |
|
112 | + Route::prefix('modules')->name('module.')->group(function() { |
|
118 | 113 | Route::delete('delete-staged/{name}', 'Installer\ModuleController@delStaged') ->name('deleteStaged'); |
119 | 114 | Route::post('upload', 'Installer\ModuleController@upload') ->name('upload'); |
120 | 115 | Route::get('activate/{name}', 'Installer\ModuleController@activate') ->name('activate'); |
@@ -8,62 +8,62 @@ discard block |
||
8 | 8 | /* |
9 | 9 | * Non user Routes |
10 | 10 | */ |
11 | -Route::get('/', 'Auth\LoginController@showLoginForm') ->name('index'); |
|
12 | -Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
13 | -Route::get('no-script', 'Controller@noScript') ->name('noscript'); |
|
14 | -Route::get('finish-setup/{hash}', 'Auth\InitializeUserController@initializeUser') ->name('initialize'); |
|
11 | +Route::get('/', 'Auth\LoginController@showLoginForm') ->name('index'); |
|
12 | +Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
13 | +Route::get('no-script', 'Controller@noScript') ->name('noscript'); |
|
14 | +Route::get('finish-setup/{hash}', 'Auth\InitializeUserController@initializeUser') ->name('initialize'); |
|
15 | 15 | Route::post('finish-setup/{hash}', 'Auth\InitializeUserController@submitInitializeUser')->name('initialize'); |
16 | 16 | |
17 | 17 | /* |
18 | 18 | * Download File Routes |
19 | 19 | */ |
20 | -Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
20 | +Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
21 | 21 | Route::get('download-archive/{filename}', 'DownloadController@downloadArchive')->name('downloadArchive'); |
22 | -Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
22 | +Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
23 | 23 | |
24 | 24 | /* |
25 | 25 | * User Settings Routes |
26 | 26 | */ |
27 | -Route::get('account', 'AccountController@index') ->name('account'); |
|
28 | -Route::post('account', 'AccountController@submit') ->name('account'); |
|
29 | -Route::put('account', 'AccountController@notifications') ->name('account'); |
|
30 | -Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
27 | +Route::get('account', 'AccountController@index') ->name('account'); |
|
28 | +Route::post('account', 'AccountController@submit') ->name('account'); |
|
29 | +Route::put('account', 'AccountController@notifications') ->name('account'); |
|
30 | +Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
31 | 31 | Route::post('/account/change-password', 'AccountController@submitPassword')->name('changePassword'); |
32 | 32 | |
33 | 33 | /* |
34 | 34 | * Basic Logged In Routes |
35 | 35 | */ |
36 | -Route::get('about', 'DashboardController@about') ->name('about'); |
|
37 | -Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
38 | -Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
36 | +Route::get('about', 'DashboardController@about') ->name('about'); |
|
37 | +Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
38 | +Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
39 | 39 | Route::get('mark-notification/{id}', 'DashboardController@markNotification')->name('markNotification'); |
40 | -Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
40 | +Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
41 | 41 | |
42 | 42 | /* |
43 | 43 | * File Link Routes |
44 | 44 | */ |
45 | -Route::prefix('links')->name('links.')->group(function () |
|
45 | +Route::prefix('links')->name('links.')->group(function() |
|
46 | 46 | { |
47 | 47 | // Resource controllers for base access |
48 | - Route::resource('data', 'FileLinks\FileLinksController'); |
|
49 | - Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
50 | - Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
48 | + Route::resource('data', 'FileLinks\FileLinksController'); |
|
49 | + Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
50 | + Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
51 | 51 | Route::get('details/{id}/{name}', 'FileLinks\FileLinksController@details') ->name('details'); |
52 | - Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
52 | + Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
53 | 53 | // File Link Files |
54 | - Route::resource('files', 'FileLinks\LinkFilesController'); |
|
54 | + Route::resource('files', 'FileLinks\LinkFilesController'); |
|
55 | 55 | // Index landing page |
56 | - Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
56 | + Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
57 | 57 | }); |
58 | 58 | |
59 | 59 | /* |
60 | 60 | * Guest File Link Routes |
61 | 61 | */ |
62 | 62 | Route::get('file-links/{id}/get-files', 'FileLinks\GuestLinksController@getFiles')->name('file-links.getFiles'); |
63 | -Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
64 | -Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
65 | -Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
66 | -Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
63 | +Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
64 | +Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
65 | +Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
66 | +Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
67 | 67 | |
68 | 68 | /* |
69 | 69 | * Customer Routes |
@@ -71,90 +71,90 @@ discard block |
||
71 | 71 | Route::prefix('customer')->name('customer.')->group(function() |
72 | 72 | { |
73 | 73 | // Customer Files |
74 | - Route::resource('files', 'Customers\CustomerFilesController'); |
|
74 | + Route::resource('files', 'Customers\CustomerFilesController'); |
|
75 | 75 | // Custome Notes |
76 | - Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
77 | - Route::resource('notes', 'Customers\CustomerNotesController'); |
|
76 | + Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
77 | + Route::resource('notes', 'Customers\CustomerNotesController'); |
|
78 | 78 | // Customer Contacts |
79 | - Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
79 | + Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
80 | 80 | // Customer Systems |
81 | - Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
81 | + Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
82 | 82 | // Customer Details |
83 | - Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
84 | - Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
85 | - Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
86 | - Route::resource('id', 'Customers\CustomerDetailsController'); |
|
83 | + Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
84 | + Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
85 | + Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
86 | + Route::resource('id', 'Customers\CustomerDetailsController'); |
|
87 | 87 | // check Id and bookmark customer |
88 | 88 | Route::get('toggle-fav/{action}/{custID}', 'Customers\CustomerController@toggleFav') ->name('toggle-fav'); |
89 | - Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
89 | + Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
90 | 90 | // Index landing/search page |
91 | - Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
92 | - Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
91 | + Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
92 | + Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
93 | 93 | }); |
94 | 94 | |
95 | 95 | /* |
96 | 96 | * Tech Tip Routes |
97 | 97 | */ |
98 | -Route::resource('tips', 'TechTips\TechTipsController'); |
|
99 | -Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
98 | +Route::resource('tips', 'TechTips\TechTipsController'); |
|
99 | +Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
100 | 100 | Route::prefix('tip')->name('tip.')->group(function() |
101 | 101 | { |
102 | - Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
103 | - Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
104 | - Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
105 | - Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
102 | + Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
103 | + Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
104 | + Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
105 | + Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
106 | 106 | Route::get('toggle-fav/{action}/{tipID}', 'TechTips\TechTipsController@toggleFav') ->name('toggle-fav'); |
107 | - Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
107 | + Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
108 | 108 | }); |
109 | 109 | |
110 | 110 | /* |
111 | 111 | * Administration Routes |
112 | 112 | */ |
113 | -Route::prefix('admin')->name('admin.')->group(function () |
|
113 | +Route::prefix('admin')->name('admin.')->group(function() |
|
114 | 114 | { |
115 | 115 | // Routes for Tech Bench Add-ons |
116 | 116 | Route::prefix('modules')->name('module.')->group(function() |
117 | 117 | { |
118 | 118 | Route::delete('delete-staged/{name}', 'Installer\ModuleController@delStaged') ->name('deleteStaged'); |
119 | - Route::post('upload', 'Installer\ModuleController@upload') ->name('upload'); |
|
120 | - Route::get('activate/{name}', 'Installer\ModuleController@activate') ->name('activate'); |
|
121 | - Route::get('disable/{name}', 'Installer\ModuleController@disable') ->name('disable'); |
|
122 | - Route::get('enable/{name}', 'Installer\ModuleController@enable') ->name('enable'); |
|
123 | - Route::get('get-active', 'Installer\ModuleController@getEnabled')->name('getEnabled'); |
|
124 | - Route::get('get-staged', 'Installer\ModuleController@getStaged') ->name('getStaged'); |
|
125 | - Route::get('/', 'Installer\ModuleController@index') ->name('index'); |
|
119 | + Route::post('upload', 'Installer\ModuleController@upload') ->name('upload'); |
|
120 | + Route::get('activate/{name}', 'Installer\ModuleController@activate') ->name('activate'); |
|
121 | + Route::get('disable/{name}', 'Installer\ModuleController@disable') ->name('disable'); |
|
122 | + Route::get('enable/{name}', 'Installer\ModuleController@enable') ->name('enable'); |
|
123 | + Route::get('get-active', 'Installer\ModuleController@getEnabled')->name('getEnabled'); |
|
124 | + Route::get('get-staged', 'Installer\ModuleController@getStaged') ->name('getStaged'); |
|
125 | + Route::get('/', 'Installer\ModuleController@index') ->name('index'); |
|
126 | 126 | }); |
127 | 127 | // Administrative routes for equipment and equipment categories |
128 | - Route::resource('categories', 'Installer\CategoriesController'); |
|
129 | - Route::resource('systems', 'Installer\SystemsController'); |
|
128 | + Route::resource('categories', 'Installer\CategoriesController'); |
|
129 | + Route::resource('systems', 'Installer\SystemsController'); |
|
130 | 130 | // Administrative routes for users |
131 | - Route::resource('user', 'Admin\UserController'); |
|
132 | - Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
133 | - Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
131 | + Route::resource('user', 'Admin\UserController'); |
|
132 | + Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
133 | + Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
134 | 134 | Route::get('check-user/{name}/{type}', 'Admin\UserController@checkUser') ->name('checkUser'); |
135 | - Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
136 | - Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
137 | - Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
138 | - Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
139 | - Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
140 | - Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
135 | + Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
136 | + Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
137 | + Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
138 | + Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
139 | + Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
140 | + Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
141 | 141 | // Tech Bench Settings Routes |
142 | - Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
143 | - Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
144 | - Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
145 | - Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
146 | - Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
147 | - Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
148 | - Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
142 | + Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
143 | + Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
144 | + Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
145 | + Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
146 | + Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
147 | + Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
148 | + Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
149 | 149 | // Tech Bench Backup Routes |
150 | - Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
151 | - Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
152 | - Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
153 | - Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
154 | - Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
150 | + Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
151 | + Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
152 | + Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
153 | + Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
154 | + Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
155 | 155 | // Tech Bench Updates Routs |
156 | 156 | |
157 | 157 | Route::get('updates', 'Installer\UpdateController@index')->name('updates'); |
158 | 158 | // Admin index route |
159 | - Route::get('/', 'Admin\AdminController@index') ->name('index'); |
|
159 | + Route::get('/', 'Admin\AdminController@index') ->name('index'); |
|
160 | 160 | }); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | if(!empty($_SERVER['HTTP_USER_AGENT'])) |
20 | 20 | { |
21 | 21 | // Check for Internet Explorer 11 |
22 | - if (preg_match("/Trident\/7.0;(.*)rv:11.0/", $_SERVER["HTTP_USER_AGENT"], $match) != 0) |
|
22 | + if(preg_match("/Trident\/7.0;(.*)rv:11.0/", $_SERVER["HTTP_USER_AGENT"], $match) != 0) |
|
23 | 23 | { |
24 | 24 | return response()->make(view('error.426'), 426); |
25 | 25 | } |
@@ -74,14 +74,16 @@ |
||
74 | 74 | ]); |
75 | 75 | |
76 | 76 | // Update the site timezone |
77 | - if (config('app.timezone') !== $request->timezone) { |
|
77 | + if (config('app.timezone') !== $request->timezone) |
|
78 | + { |
|
78 | 79 | Settings::firstOrCreate( |
79 | 80 | ['key' => 'app.timezone'], |
80 | 81 | ['key' => 'app.timezone', 'value' => $request->timezone] |
81 | 82 | )->update(['value' => $request->timezone]); |
82 | 83 | } |
83 | 84 | // Update the maximum file upload size |
84 | - if (config('filesystems.paths.max_size') !== $request->filesize) { |
|
85 | + if (config('filesystems.paths.max_size') !== $request->filesize) |
|
86 | + { |
|
85 | 87 | Settings::firstOrCreate( |
86 | 88 | ['key' => 'filesystems.paths.max_size'], |
87 | 89 | ['key' => 'filesystems.paths.max_size', 'value' => $request->filesize] |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | // Bring up the change logo form |
27 | 27 | public function logoSettings() |
28 | 28 | { |
29 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
29 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
30 | 30 | |
31 | 31 | return view('installer.logoSettings'); |
32 | 32 | } |
33 | 33 | // Submit the new company logo |
34 | 34 | public function submitLogo(Request $request) |
35 | 35 | { |
36 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
36 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
37 | 37 | |
38 | 38 | $request->validate([ |
39 | 39 | 'file' => 'mimes:jpeg,bmp,png,jpg,gif' |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | |
46 | 46 | Settings::firstOrCreate( |
47 | 47 | ['key' => 'app.logo'], |
48 | - ['key' => 'app.logo', 'value' => '/storage/img/' . $fileName] |
|
49 | - )->update(['value' => '/storage/img/' . $fileName]); |
|
48 | + ['key' => 'app.logo', 'value' => '/storage/img/'.$fileName] |
|
49 | + )->update(['value' => '/storage/img/'.$fileName]); |
|
50 | 50 | |
51 | - Log::notice('A new company logo has been uploaded by ' . Auth::user()->full_name); |
|
51 | + Log::notice('A new company logo has been uploaded by '.Auth::user()->full_name); |
|
52 | 52 | |
53 | - return response()->json(['url' => '/storage/img/' . $fileName]); |
|
53 | + return response()->json(['url' => '/storage/img/'.$fileName]); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function configuration() |
57 | 57 | { |
58 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
58 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
59 | 59 | |
60 | 60 | $settings = collect([ |
61 | 61 | // 'url' => config('app.url'), |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | public function submitConfiguration(Request $request) |
73 | 73 | { |
74 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
74 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
75 | 75 | |
76 | 76 | $request->validate([ |
77 | 77 | 'timezone' => 'required', |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | ]); |
81 | 81 | |
82 | 82 | // Update the site timezone |
83 | - if (config('app.timezone') !== $request->timezone) { |
|
83 | + if(config('app.timezone') !== $request->timezone) { |
|
84 | 84 | Settings::firstOrCreate( |
85 | 85 | ['key' => 'app.timezone'], |
86 | 86 | ['key' => 'app.timezone', 'value' => $request->timezone] |
87 | 87 | )->update(['value' => $request->timezone]); |
88 | 88 | } |
89 | 89 | // Update the maximum file upload size |
90 | - if (config('filesystems.paths.max_size') !== $request->filesize) { |
|
90 | + if(config('filesystems.paths.max_size') !== $request->filesize) { |
|
91 | 91 | Settings::firstOrCreate( |
92 | 92 | ['key' => 'filesystems.paths.max_size'], |
93 | 93 | ['key' => 'filesystems.paths.max_size', 'value' => $request->filesize] |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | // System backups index page |
102 | 102 | public function backupsIndex() |
103 | 103 | { |
104 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
104 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
105 | 105 | |
106 | 106 | return view('installer.backupsIndex'); |
107 | 107 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | // Retrieve the list of backups |
110 | 110 | public function getBackups() |
111 | 111 | { |
112 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
112 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
113 | 113 | |
114 | 114 | $backups = Storage::disk('backup')->files(); |
115 | 115 | $buArray = []; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | // Delete a backup |
134 | 134 | public function delBackup($name) |
135 | 135 | { |
136 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
136 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
137 | 137 | |
138 | 138 | Storage::disk('backup')->delete($name); |
139 | 139 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | // Download a backup |
145 | 145 | public function downloadBackup($name) |
146 | 146 | { |
147 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
147 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
148 | 148 | |
149 | 149 | if(Storage::disk('backup')->exists($name)) |
150 | 150 | { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // Create a new backup |
160 | 160 | public function runBackup() |
161 | 161 | { |
162 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
162 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
163 | 163 | |
164 | 164 | Artisan::call('tb-backup:run'); |
165 | 165 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | // Email Settings form |
176 | 176 | public function emailSettings() |
177 | 177 | { |
178 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
178 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
179 | 179 | |
180 | 180 | $settings = collect([ |
181 | 181 | 'host' => config('mail.host'), |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | // Send a test email |
195 | 195 | public function sendTestEmail(Request $request) |
196 | 196 | { |
197 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
197 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
198 | 198 | |
199 | 199 | // TODO - fix this and make it work |
200 | 200 | return response()->json(['success' => false]); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | // Submit the test email form |
258 | 258 | public function submitEmailSettings(Request $request) |
259 | 259 | { |
260 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
260 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
261 | 261 | |
262 | 262 | $request->validate([ |
263 | 263 | 'host' => 'required', |
@@ -128,7 +128,8 @@ |
||
128 | 128 | |
129 | 129 | // Update the primary contact information |
130 | 130 | $details = Customers::find($request->cust_id); |
131 | - if ($details->parent_id && $request->shared == 'true') { |
|
131 | + if ($details->parent_id && $request->shared == 'true') |
|
132 | + { |
|
132 | 133 | $request->cust_id = $details->parent_id; |
133 | 134 | } |
134 | 135 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // Store a new customer contact |
24 | 24 | public function store(Request $request) |
25 | 25 | { |
26 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
26 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
27 | 27 | |
28 | 28 | $request->validate([ |
29 | 29 | 'cust_id' => 'required', |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | // Determine if there is a parent site with shared contacts |
72 | 72 | $parent = Customers::find($id)->parent_id; |
73 | - if ($parent) |
|
73 | + if($parent) |
|
74 | 74 | { |
75 | 75 | $parentList = CustomerContacts::where('cust_id', $parent) |
76 | 76 | ->where('shared', 1) |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | // Update an existing Customer Contact |
122 | 122 | public function update(Request $request, $id) |
123 | 123 | { |
124 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
124 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
125 | 125 | |
126 | 126 | $request->validate([ |
127 | 127 | 'cust_id' => 'required', |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | // Update the primary contact information |
132 | 132 | $details = Customers::find($request->cust_id); |
133 | - if ($details->parent_id && $request->shared == 'true') { |
|
133 | + if($details->parent_id && $request->shared == 'true') { |
|
134 | 134 | $request->cust_id = $details->parent_id; |
135 | 135 | } |
136 | 136 |