@@ -13,7 +13,7 @@ |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | -$factory->define(App\User::class, function (Faker $faker) { |
|
16 | +$factory->define(App\User::class, function(Faker $faker) { |
|
17 | 17 | return [ |
18 | 18 | 'name' => $faker->name, |
19 | 19 | 'email' => $faker->unique()->safeEmail, |
@@ -22,7 +22,7 @@ |
||
22 | 22 | Route::get('account/change-password', 'AccountController@changePassword')->name('changePassword'); |
23 | 23 | Route::post('account/change-password', 'AccountController@submitPassword')->name('submitPassword'); |
24 | 24 | |
25 | -Route::middleware(['password_expired'])->group(function () |
|
25 | +Route::middleware(['password_expired'])->group(function() |
|
26 | 26 | { |
27 | 27 | // Tech/Registered User Routes |
28 | 28 | Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | Route::post('/finish-setup/{hash}', 'UserController@submitInitializeUser')->name('submitInitialize'); |
12 | 12 | |
13 | 13 | /////////////////////////// User File Link Routes ///////////////////////////////////////// |
14 | -Route::prefix('file-links')->name('userLink.')->group(function() |
|
15 | -{ |
|
14 | +Route::prefix('file-links')->name('userLink.')->group(function() { |
|
16 | 15 | Route::get('download-all/{link}', 'UserLinksController@downloadAllFiles')->name('downloadAll'); |
17 | 16 | Route::post('details/{link}', 'UserLinksController@uploadFiles')->name('upload'); |
18 | 17 | Route::get('details/{link}', 'UserLinksController@details')->name('details'); |
@@ -23,11 +22,9 @@ discard block |
||
23 | 22 | Route::get('account/change-password', 'AccountController@changePassword')->name('changePassword'); |
24 | 23 | Route::post('account/change-password', 'AccountController@submitPassword')->name('submitPassword'); |
25 | 24 | |
26 | -Route::middleware(['password_expired'])->group(function () |
|
27 | -{ |
|
25 | +Route::middleware(['password_expired'])->group(function () { |
|
28 | 26 | // Tech/Registered User Routes |
29 | - Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() |
|
30 | - { |
|
27 | + Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() { |
|
31 | 28 | /////////////////////////// Basic User Routes ///////////////////////////////////////// |
32 | 29 | Route::get('about', 'PagesController@about')->name('about'); |
33 | 30 | Route::get('account', 'AccountController@index')->name('account'); |
@@ -36,8 +33,7 @@ discard block |
||
36 | 33 | Route::get('mark-notification/{id}', 'DashboardController@markNotification')->name('mark-notification'); |
37 | 34 | |
38 | 35 | ////////////////////////// System Routes //////////////////////////////////////////// |
39 | - Route::prefix('system')->name('system.')->group(function() |
|
40 | - { |
|
36 | + Route::prefix('system')->name('system.')->group(function() { |
|
41 | 37 | Route::get('sys-fields/{id}', 'SystemController@fields')->name('sysFields'); |
42 | 38 | Route::post('files/replace/{id}', 'SystemFilesController@replace')->name('files.replace'); |
43 | 39 | Route::get('files/replace/{id}', 'SystemFilesController@replaceForm')->name('files.replaceForm'); |
@@ -49,8 +45,7 @@ discard block |
||
49 | 45 | }); |
50 | 46 | |
51 | 47 | ////////////////////////// Customer Routes //////////////////////////////////////////// |
52 | - Route::prefix('customer')->name('customer.')->group(function() |
|
53 | - { |
|
48 | + Route::prefix('customer')->name('customer.')->group(function() { |
|
54 | 49 | Route::get('download-note/{id}', 'CustomerController@generatePDF')->name('downloadNote'); |
55 | 50 | Route::get('fav/{action}/{id}', 'CustomerController@toggleFav')->name('toggleFav'); |
56 | 51 | Route::resource('files', 'CustomerFilesController'); |
@@ -67,8 +62,7 @@ discard block |
||
67 | 62 | }); |
68 | 63 | |
69 | 64 | ////////////////////////// Tech Tips Routes ////////////////////////////////////////// |
70 | - Route::prefix('tip')->name('tip.')->group(function() |
|
71 | - { |
|
65 | + Route::prefix('tip')->name('tip.')->group(function() { |
|
72 | 66 | Route::get('download-note/{id}', 'TechTipsController@generatePDF')->name('downloadTip'); |
73 | 67 | Route::post('upload-image', 'TechTipsController@processImage')->name('processImage'); |
74 | 68 | Route::get('fav/{action}/{id}', 'TechTipsController@toggleFav')->name('toggleFav'); |
@@ -80,8 +74,7 @@ discard block |
||
80 | 74 | }); |
81 | 75 | |
82 | 76 | ////////////////////////// File Links Routes ////////////////////////////////////////// |
83 | - Route::prefix('links')->name('links.')->group(function() |
|
84 | - { |
|
77 | + Route::prefix('links')->name('links.')->group(function() { |
|
85 | 78 | Route::get('download-all/{id}', 'FileLinksController@downloadAllFiles')->name('downloadAll'); |
86 | 79 | Route::post('addFile/{id}', 'FileLinksController@submitAddFile')->name('submitAdd'); |
87 | 80 | Route::get('addFile/{id}', 'FileLinksController@addFileForm')->name('addFile'); |
@@ -95,10 +88,8 @@ discard block |
||
95 | 88 | }); |
96 | 89 | |
97 | 90 | // Administration Routes |
98 | - Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() |
|
99 | - { |
|
100 | - Route::prefix('admin')->name('admin.')->group(function() |
|
101 | - { |
|
91 | + Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() { |
|
92 | + Route::prefix('admin')->name('admin.')->group(function() { |
|
102 | 93 | Route::get('links/show/{id}', 'AdminController@showLinks')->name('showLinks'); |
103 | 94 | Route::get('links', 'AdminController@links')->name('links'); |
104 | 95 | Route::post('resetPass/{id}', 'UserController@resetPassword')->name('resetPass'); |
@@ -109,10 +100,8 @@ discard block |
||
109 | 100 | }); |
110 | 101 | |
111 | 102 | // Installer Routes |
112 | - Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() |
|
113 | - { |
|
114 | - Route::prefix('installer')->name('installer.')->group(function() |
|
115 | - { |
|
103 | + Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() { |
|
104 | + Route::prefix('installer')->name('installer.')->group(function() { |
|
116 | 105 | /////////////////////// Systems and Categories Routes ////////////////////////////// |
117 | 106 | Route::resource('system-categories', 'SystemCategoriesController'); |
118 | 107 | Route::get('systems/new/{cat}', 'SystemTypesController@newSys')->name('newSys'); |
@@ -290,22 +290,22 @@ discard block |
||
290 | 290 | |
291 | 291 | if(!empty($over)) |
292 | 292 | { |
293 | - foreach($over as $ov) |
|
294 | - { |
|
295 | - $res[] = [ |
|
296 | - 'type' => 'error', |
|
297 | - 'value' => ' Link for '.$ov['username'].' is '.$ov['age'].' days old' |
|
298 | - ]; |
|
293 | + foreach($over as $ov) |
|
294 | + { |
|
295 | + $res[] = [ |
|
296 | + 'type' => 'error', |
|
297 | + 'value' => ' Link for '.$ov['username'].' is '.$ov['age'].' days old' |
|
298 | + ]; |
|
299 | 299 | |
300 | - if($this->fix) |
|
301 | - { |
|
302 | - UserInitialize::where('username', $ov['username'])->delete(); |
|
303 | - $res[] = [ |
|
304 | - 'type' => 'info', |
|
305 | - 'value' => ' Corrected' |
|
306 | - ]; |
|
307 | - } |
|
308 | - } |
|
300 | + if($this->fix) |
|
301 | + { |
|
302 | + UserInitialize::where('username', $ov['username'])->delete(); |
|
303 | + $res[] = [ |
|
304 | + 'type' => 'info', |
|
305 | + 'value' => ' Corrected' |
|
306 | + ]; |
|
307 | + } |
|
308 | + } |
|
309 | 309 | } |
310 | 310 | } |
311 | 311 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | } |
426 | 426 | } |
427 | 427 | |
428 | - $res = array_merge($res, $res2); |
|
428 | + $res = array_merge($res, $res2); |
|
429 | 429 | |
430 | 430 | return $res; |
431 | 431 | } |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | private function customerFiles() |
435 | 435 | { |
436 | 436 | $res = []; |
437 | - $res2 = []; |
|
437 | + $res2 = []; |
|
438 | 438 | |
439 | 439 | $badPointer = 0; |
440 | 440 | $missingFile = 0; |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | } |
529 | 529 | } |
530 | 530 | |
531 | - $res = array_merge($res, $res2); |
|
531 | + $res = array_merge($res, $res2); |
|
532 | 532 | |
533 | 533 | return $res; |
534 | 534 | } |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | private function linkFiles() |
538 | 538 | { |
539 | 539 | $res = []; |
540 | - $res2 = []; |
|
540 | + $res2 = []; |
|
541 | 541 | |
542 | 542 | $badPointer = 0; |
543 | 543 | $missingFile = 0; |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | } |
632 | 632 | } |
633 | 633 | |
634 | - $res = array_merge($res, $res2); |
|
634 | + $res = array_merge($res, $res2); |
|
635 | 635 | |
636 | 636 | return $res; |
637 | 637 | } |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | private function tipFiles() |
641 | 641 | { |
642 | 642 | $res = []; |
643 | - $res2 = []; |
|
643 | + $res2 = []; |
|
644 | 644 | |
645 | 645 | $badPointer = 0; |
646 | 646 | $missingFile = 0; |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | } |
735 | 735 | } |
736 | 736 | |
737 | - $res = array_merge($res, $res2); |
|
737 | + $res = array_merge($res, $res2); |
|
738 | 738 | |
739 | 739 | return $res; |
740 | 740 | } |
@@ -749,36 +749,36 @@ discard block |
||
749 | 749 | 'value' => 'Unknown Files.....................'.count($this->fileArr) |
750 | 750 | ]; |
751 | 751 | |
752 | - if(count($this->fileArr) > 0) |
|
753 | - { |
|
754 | - foreach($this->fileArr as $file) |
|
755 | - { |
|
756 | - $fileData = Files::find($file); |
|
752 | + if(count($this->fileArr) > 0) |
|
753 | + { |
|
754 | + foreach($this->fileArr as $file) |
|
755 | + { |
|
756 | + $fileData = Files::find($file); |
|
757 | 757 | |
758 | - $res[] = [ |
|
759 | - 'type' => 'line', |
|
760 | - 'value' => ' Unknown File ID - '.$fileData->file_id.' - '.$fileData->file_link.$fileData->file_name, |
|
761 | - 'repOnly' => true |
|
762 | - ]; |
|
758 | + $res[] = [ |
|
759 | + 'type' => 'line', |
|
760 | + 'value' => ' Unknown File ID - '.$fileData->file_id.' - '.$fileData->file_link.$fileData->file_name, |
|
761 | + 'repOnly' => true |
|
762 | + ]; |
|
763 | 763 | |
764 | - if($this->fix) |
|
765 | - { |
|
766 | - $res[] = [ |
|
767 | - 'type' => 'info', |
|
768 | - 'value' => ' Corrected', |
|
764 | + if($this->fix) |
|
765 | + { |
|
766 | + $res[] = [ |
|
767 | + 'type' => 'info', |
|
768 | + 'value' => ' Corrected', |
|
769 | 769 | 'repOnly' => true |
770 | - ]; |
|
770 | + ]; |
|
771 | 771 | |
772 | - if(!Storage::exists($fileData->file_link.$fileData->file_name)) |
|
773 | - { |
|
774 | - Storage::delete($fileData->file_link.$fileData->file_name); |
|
775 | - } |
|
772 | + if(!Storage::exists($fileData->file_link.$fileData->file_name)) |
|
773 | + { |
|
774 | + Storage::delete($fileData->file_link.$fileData->file_name); |
|
775 | + } |
|
776 | 776 | |
777 | - $fileData->delete(); |
|
777 | + $fileData->delete(); |
|
778 | 778 | |
779 | - } |
|
780 | - } |
|
781 | - } |
|
779 | + } |
|
780 | + } |
|
781 | + } |
|
782 | 782 | |
783 | 783 | |
784 | 784 | /* |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | { |
818 | 818 | $res = []; |
819 | 819 | |
820 | - $allFiles = File::allFiles(config('filesystems.disks.local.root')); |
|
820 | + $allFiles = File::allFiles(config('filesystems.disks.local.root')); |
|
821 | 821 | |
822 | 822 | foreach($allFiles as $pos => $file) |
823 | 823 | { |
@@ -162,7 +162,7 @@ |
||
162 | 162 | ->where('user_role.role_id', '<=', 2) |
163 | 163 | ->get(); |
164 | 164 | |
165 | - $res[] = [ 'type' => 'info', 'value' => 'System Administrators ('.count($admins).')']; |
|
165 | + $res[] = ['type' => 'info', 'value' => 'System Administrators ('.count($admins).')']; |
|
166 | 166 | foreach($admins as $admin) |
167 | 167 | { |
168 | 168 | $res[] = [ |
@@ -133,7 +133,7 @@ |
||
133 | 133 | |
134 | 134 | // Print the output to the screen and write for PDF report |
135 | 135 | private function output($data) |
136 | - { |
|
136 | + { |
|
137 | 137 | foreach($data as $d) |
138 | 138 | { |
139 | 139 | // Console Output |
@@ -14,7 +14,7 @@ |
||
14 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |
15 | 15 | // built-in PHP web server. This provides a convenient way to test a Laravel |
16 | 16 | // application without having installed a "real" web server software here. |
17 | -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { |
|
17 | +if($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { |
|
18 | 18 | return false; |
19 | 19 | } |
20 | 20 |
@@ -14,7 +14,8 @@ |
||
14 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |
15 | 15 | // built-in PHP web server. This provides a convenient way to test a Laravel |
16 | 16 | // application without having installed a "real" web server software here. |
17 | -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { |
|
17 | +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) |
|
18 | +{ |
|
18 | 19 | return false; |
19 | 20 | } |
20 | 21 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $sys1->sys_id = 1; |
18 | 18 | $sys1->cat_id = 1; |
19 | 19 | $sys1->name = 'NEC'; |
20 | - $sys1->parent_id = NULL; |
|
20 | + $sys1->parent_id = null; |
|
21 | 21 | $sys1->folder_location = 'nec'; |
22 | 22 | $sys1->save(); |
23 | 23 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $sys7->sys_id = 7; |
66 | 66 | $sys7->cat_id = 1; |
67 | 67 | $sys7->name = 'ShoreTel'; |
68 | - $sys7->parent_id = NULL; |
|
68 | + $sys7->parent_id = null; |
|
69 | 69 | $sys7->folder_location = 'shoretel'; |
70 | 70 | $sys7->save(); |
71 | 71 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $sys8->sys_id = 8; |
74 | 74 | $sys8->cat_id = 1; |
75 | 75 | $sys8->name = 'Zultys'; |
76 | - $sys8->parent_id = NULL; |
|
76 | + $sys8->parent_id = null; |
|
77 | 77 | $sys8->folder_location = 'zultys'; |
78 | 78 | $sys8->save(); |
79 | 79 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $sys9->sys_id = 9; |
82 | 82 | $sys9->cat_id = 1; |
83 | 83 | $sys9->name = 'Miscellaneous'; |
84 | - $sys9->parent_id = NULL; |
|
84 | + $sys9->parent_id = null; |
|
85 | 85 | $sys9->folder_location = 'miscellaneous'; |
86 | 86 | $sys9->save(); |
87 | 87 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $sys10->sys_id = 10; |
91 | 91 | $sys10->cat_id = 2; |
92 | 92 | $sys10->name = 'Pelco'; |
93 | - $sys10->parent_id = NULL; |
|
93 | + $sys10->parent_id = null; |
|
94 | 94 | $sys10->folder_location = 'pelco'; |
95 | 95 | $sys10->save(); |
96 | 96 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $sys15->sys_id = 15; |
132 | 132 | $sys15->cat_id = 3; |
133 | 133 | $sys15->name = 'Class Connection'; |
134 | - $sys15->parent_id = NULL; |
|
134 | + $sys15->parent_id = null; |
|
135 | 135 | $sys15->folder_location = 'classconnection'; |
136 | 136 | $sys15->save(); |
137 | 137 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $sys16->sys_id = 16; |
140 | 140 | $sys16->cat_id = 3; |
141 | 141 | $sys16->name = 'SynApps'; |
142 | - $sys16->parent_id = NULL; |
|
142 | + $sys16->parent_id = null; |
|
143 | 143 | $sys16->folder_location = 'synapps'; |
144 | 144 | $sys16->save(); |
145 | 145 | } |
@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('system_cust_data_types', function(Blueprint $table) |
|
17 | - { |
|
16 | + Schema::table('system_cust_data_types', function(Blueprint $table) { |
|
18 | 17 | $table->boolean('hidden') |
19 | 18 | ->default(0) |
20 | 19 | ->after('name'); |
@@ -28,8 +27,7 @@ discard block |
||
28 | 27 | */ |
29 | 28 | public function down() |
30 | 29 | { |
31 | - Schema::table('system_cust_data_types', function(Blueprint $table) |
|
32 | - { |
|
30 | + Schema::table('system_cust_data_types', function(Blueprint $table) { |
|
33 | 31 | $table->dropColumn('hidden'); |
34 | 32 | }); |
35 | 33 | } |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function up() |
17 | 17 | { |
18 | - Schema::table('users', function(Blueprint $table) |
|
19 | - { |
|
18 | + Schema::table('users', function(Blueprint $table) { |
|
20 | 19 | $table->timestamp('password_expires') |
21 | 20 | ->nullable() |
22 | 21 | ->after('active'); |
@@ -41,8 +40,7 @@ discard block |
||
41 | 40 | */ |
42 | 41 | public function down() |
43 | 42 | { |
44 | - Schema::table('users', function(Blueprint $table) |
|
45 | - { |
|
43 | + Schema::table('users', function(Blueprint $table) { |
|
46 | 44 | $table->dropColumn('password_expires'); |
47 | 45 | }); |
48 | 46 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function handle($request, Closure $next, $guard = null) |
19 | 19 | { |
20 | - if (Auth::guard($guard)->check()) { |
|
20 | + if(Auth::guard($guard)->check()) { |
|
21 | 21 | return redirect('/dashboard'); |
22 | 22 | } |
23 | 23 |
@@ -17,7 +17,8 @@ |
||
17 | 17 | */ |
18 | 18 | public function handle($request, Closure $next, $guard = null) |
19 | 19 | { |
20 | - if (Auth::guard($guard)->check()) { |
|
20 | + if (Auth::guard($guard)->check()) |
|
21 | + { |
|
21 | 22 | return redirect('/dashboard'); |
22 | 23 | } |
23 | 24 |
@@ -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)); |