@@ -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 | ]; |
@@ -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 | }); |
@@ -395,8 +402,7 @@ discard block |
||
| 395 | 402 | { |
| 396 | 403 | if(!Schema::hasForeign('tech_tip_comments', ['user_id'])) |
| 397 | 404 | { |
| 398 | - Schema::table('tech_tip_comments', function(Blueprint $table) |
|
| 399 | - { |
|
| 405 | + Schema::table('tech_tip_comments', function(Blueprint $table) { |
|
| 400 | 406 | $table->foreign('user_id')->references('user_id')->on('users')->onUpdate('cascade'); |
| 401 | 407 | }); |
| 402 | 408 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function __construct() |
| 31 | 31 | { |
| 32 | 32 | $this->middleware('auth')->except('initializeUser', 'submitInitializeUser'); |
| 33 | - $this->middleware(function ($request, $next) { |
|
| 33 | + $this->middleware(function($request, $next) { |
|
| 34 | 34 | $this->authorize('hasAccess', 'Manage Users'); |
| 35 | 35 | return $next($request); |
| 36 | 36 | }); |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | // Show the list of current users to edit |
| 40 | 40 | public function index() |
| 41 | 41 | { |
| 42 | - $userList = new UserCollection(User::with(['UserLogins' => function ($query) { |
|
| 42 | + $userList = new UserCollection(User::with(['UserLogins' => function($query) { |
|
| 43 | 43 | $query->latest()->limit(1); |
| 44 | 44 | }])->get() |
| 45 | 45 | /** @scrutinizer ignore-call */ |
| 46 | 46 | ->makeVisible('user_id')); |
| 47 | - $route = 'admin.user.edit'; |
|
| 47 | + $route = 'admin.user.edit'; |
|
| 48 | 48 | |
| 49 | 49 | return view('admin.userIndex', [ |
| 50 | 50 | 'userList' => $userList, |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | // List all inactive users |
| 148 | 148 | public function show($type) |
| 149 | 149 | { |
| 150 | - $route = ''; |
|
| 150 | + $route = ''; |
|
| 151 | 151 | |
| 152 | 152 | if($type !== 'inactive') |
| 153 | 153 | { |
@@ -171,17 +171,17 @@ discard block |
||
| 171 | 171 | $user = new UserResource(User::findOrFail($id)); |
| 172 | 172 | |
| 173 | 173 | // Make sure that the user is not trying to deactivate someone with more permissions |
| 174 | - if ($user->role_id < Auth::user()->role_id) |
|
| 174 | + if($user->role_id < Auth::user()->role_id) |
|
| 175 | 175 | { |
| 176 | 176 | return abort(403); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | // Good to go - update user password |
| 180 | 180 | $roleArr = []; |
| 181 | - foreach ($roles as $role) { |
|
| 182 | - if ($role->role_id == 1 && Auth::user()->role_id != 1) { |
|
| 181 | + foreach($roles as $role) { |
|
| 182 | + if($role->role_id == 1 && Auth::user()->role_id != 1) { |
|
| 183 | 183 | continue; |
| 184 | - } else if ($role->role_id == 2 && Auth::user()->role_id > 1) { |
|
| 184 | + } else if($role->role_id == 2 && Auth::user()->role_id > 1) { |
|
| 185 | 185 | continue; |
| 186 | 186 | } else { |
| 187 | 187 | // $roleArr[$role->role_id] = $role->name; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
| 195 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
| 196 | 196 | return view('admin.userEdit', [ |
| 197 | 197 | 'roles' => $roleArr, |
| 198 | 198 | 'user' => $user-> |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | // Update the user data |
| 232 | 232 | $user = User::findOrFail($id); |
| 233 | 233 | |
| 234 | - if ($user->role_id < Auth::user()->role_id) |
|
| 234 | + if($user->role_id < Auth::user()->role_id) |
|
| 235 | 235 | { |
| 236 | 236 | return abort(403); |
| 237 | 237 | } |
@@ -274,12 +274,12 @@ discard block |
||
| 274 | 274 | $user = User::find($request->user_id); |
| 275 | 275 | |
| 276 | 276 | // Verify this is a valid user ID |
| 277 | - if (!$user) { |
|
| 277 | + if(!$user) { |
|
| 278 | 278 | $success = false; |
| 279 | 279 | $reason = 'Cannot find user with this ID'; |
| 280 | 280 | } |
| 281 | 281 | // Make sure that the user is not trying to deactivate someone with more permissions |
| 282 | - else if ($user->role_id < Auth::user()->role_id) { |
|
| 282 | + else if($user->role_id < Auth::user()->role_id) { |
|
| 283 | 283 | $success = false; |
| 284 | 284 | $reason = 'You cannot change password for a user with higher permissions that you. If this user has locked themselves out, have then use the reset link on the login page.'; |
| 285 | 285 | } |
@@ -292,11 +292,11 @@ discard block |
||
| 292 | 292 | 'password_expires' => $nextChange |
| 293 | 293 | ]); |
| 294 | 294 | $success = true; |
| 295 | - $reason = 'Password for ' . $user->full_name . ' successfully reset.'; |
|
| 295 | + $reason = 'Password for '.$user->full_name.' successfully reset.'; |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
| 299 | - Log::notice('User ID-' . $request->user_id . ' password chagned by ' . Auth::user()->user_id, [ |
|
| 298 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
| 299 | + Log::notice('User ID-'.$request->user_id.' password chagned by '.Auth::user()->user_id, [ |
|
| 300 | 300 | 'success' => $success, |
| 301 | 301 | 'reason' => $reason, |
| 302 | 302 | ]); |
@@ -8,8 +8,8 @@ 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'); |
|
| 11 | +Route::get('/', 'Auth\LoginController@showLoginForm')->name('index'); |
|
| 12 | +Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
| 13 | 13 | Route::get('no-script', 'Controller@noScript') ->name('noscript'); |
| 14 | 14 | |
| 15 | 15 | |
@@ -21,53 +21,53 @@ discard block |
||
| 21 | 21 | /* |
| 22 | 22 | * Download File Routes |
| 23 | 23 | */ |
| 24 | -Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
| 24 | +Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
| 25 | 25 | Route::get('download-archive/{filename}', 'DownloadController@downloadArchive')->name('downloadArchive'); |
| 26 | -Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
| 26 | +Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
| 27 | 27 | |
| 28 | 28 | /* |
| 29 | 29 | * User Settings Routes |
| 30 | 30 | */ |
| 31 | -Route::get('account', 'AccountController@index') ->name('account'); |
|
| 32 | -Route::post('account', 'AccountController@submit') ->name('account'); |
|
| 33 | -Route::put('account', 'AccountController@notifications') ->name('account'); |
|
| 34 | -Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
| 31 | +Route::get('account', 'AccountController@index') ->name('account'); |
|
| 32 | +Route::post('account', 'AccountController@submit') ->name('account'); |
|
| 33 | +Route::put('account', 'AccountController@notifications') ->name('account'); |
|
| 34 | +Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
| 35 | 35 | Route::post('/account/change-password', 'AccountController@submitPassword')->name('changePassword'); |
| 36 | 36 | |
| 37 | 37 | /* |
| 38 | 38 | * Basic Logged In Routes |
| 39 | 39 | */ |
| 40 | -Route::get('about', 'DashboardController@about') ->name('about'); |
|
| 41 | -Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
| 42 | -Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
| 40 | +Route::get('about', 'DashboardController@about') ->name('about'); |
|
| 41 | +Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
| 42 | +Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
| 43 | 43 | Route::get('mark-notification/{id}', 'DashboardController@markNotification')->name('markNotification'); |
| 44 | -Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
| 44 | +Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
| 45 | 45 | |
| 46 | 46 | /* |
| 47 | 47 | * File Link Routes |
| 48 | 48 | */ |
| 49 | -Route::prefix('links')->name('links.')->group(function () |
|
| 49 | +Route::prefix('links')->name('links.')->group(function() |
|
| 50 | 50 | { |
| 51 | 51 | // Resource controllers for base access |
| 52 | - Route::resource('data', 'FileLinks\FileLinksController'); |
|
| 53 | - Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
| 54 | - Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
| 52 | + Route::resource('data', 'FileLinks\FileLinksController'); |
|
| 53 | + Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
| 54 | + Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
| 55 | 55 | Route::get('details/{id}/{name}', 'FileLinks\FileLinksController@details') ->name('details'); |
| 56 | - Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
| 56 | + Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
| 57 | 57 | // File Link Files |
| 58 | - Route::resource('files', 'FileLinks\LinkFilesController'); |
|
| 58 | + Route::resource('files', 'FileLinks\LinkFilesController'); |
|
| 59 | 59 | // Index landing page |
| 60 | - Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
| 60 | + Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | 63 | /* |
| 64 | 64 | * Guest File Link Routes |
| 65 | 65 | */ |
| 66 | 66 | Route::get('file-links/{id}/get-files', 'FileLinks\GuestLinksController@getFiles')->name('file-links.getFiles'); |
| 67 | -Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
| 68 | -Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
| 69 | -Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
| 70 | -Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
| 67 | +Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
| 68 | +Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
| 69 | +Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
| 70 | +Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
| 71 | 71 | |
| 72 | 72 | /* |
| 73 | 73 | * Customer Routes |
@@ -75,87 +75,87 @@ discard block |
||
| 75 | 75 | Route::prefix('customer')->name('customer.')->group(function() |
| 76 | 76 | { |
| 77 | 77 | // Customer Files |
| 78 | - Route::resource('files', 'Customers\CustomerFilesController'); |
|
| 78 | + Route::resource('files', 'Customers\CustomerFilesController'); |
|
| 79 | 79 | // Custome Notes |
| 80 | - Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
| 81 | - Route::resource('notes', 'Customers\CustomerNotesController'); |
|
| 80 | + Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
| 81 | + Route::resource('notes', 'Customers\CustomerNotesController'); |
|
| 82 | 82 | // Customer Contacts |
| 83 | - Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
| 83 | + Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
| 84 | 84 | // Customer Systems |
| 85 | - Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
| 85 | + Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
| 86 | 86 | // Customer Details |
| 87 | - Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
| 88 | - Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
| 89 | - Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
| 90 | - Route::resource('id', 'Customers\CustomerDetailsController'); |
|
| 87 | + Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
| 88 | + Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
| 89 | + Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
| 90 | + Route::resource('id', 'Customers\CustomerDetailsController'); |
|
| 91 | 91 | // check Id and bookmark customer |
| 92 | 92 | Route::get('toggle-fav/{action}/{custID}', 'Customers\CustomerController@toggleFav') ->name('toggle-fav'); |
| 93 | - Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
| 93 | + Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
| 94 | 94 | // Index landing/search page |
| 95 | - Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
| 96 | - Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
| 95 | + Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
| 96 | + Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | 99 | /* |
| 100 | 100 | * Tech Tip Routes |
| 101 | 101 | */ |
| 102 | -Route::resource('tips', 'TechTips\TechTipsController'); |
|
| 103 | -Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
| 102 | +Route::resource('tips', 'TechTips\TechTipsController'); |
|
| 103 | +Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
| 104 | 104 | Route::prefix('tip')->name('tip.')->group(function() |
| 105 | 105 | { |
| 106 | - Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
| 107 | - Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
| 108 | - Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
| 109 | - Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
| 106 | + Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
| 107 | + Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
| 108 | + Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
| 109 | + Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
| 110 | 110 | Route::get('toggle-fav/{action}/{tipID}', 'TechTips\TechTipsController@toggleFav') ->name('toggle-fav'); |
| 111 | - Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
| 111 | + Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
| 112 | 112 | }); |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | * Administration Routes |
| 116 | 116 | */ |
| 117 | -Route::prefix('admin')->name('admin.')->group(function () |
|
| 117 | +Route::prefix('admin')->name('admin.')->group(function() |
|
| 118 | 118 | { |
| 119 | 119 | // Routes for Tech Bench Add-ons |
| 120 | 120 | Route::prefix('modules')->name('module.')->group(function() |
| 121 | 121 | { |
| 122 | 122 | Route::delete('delete-staged/{name}', 'Installer\ModuleController@delStaged')->name('deleteStaged'); |
| 123 | - Route::post('upload', 'Installer\ModuleController@upload')->name('upload'); |
|
| 124 | - Route::get('activate/{name}', 'Installer\ModuleController@activate')->name('activate'); |
|
| 125 | - Route::get('disable/{name}', 'Installer\ModuleController@disable')->name('disable'); |
|
| 126 | - Route::get('enable/{name}', 'Installer\ModuleController@enable')->name('enable'); |
|
| 127 | - Route::get('get-active', 'Installer\ModuleController@getEnabled')->name('getEnabled'); |
|
| 128 | - Route::get('get-staged', 'Installer\ModuleController@getStaged')->name('getStaged'); |
|
| 129 | - Route::get('/', 'Installer\ModuleController@index')->name('index'); |
|
| 123 | + Route::post('upload', 'Installer\ModuleController@upload')->name('upload'); |
|
| 124 | + Route::get('activate/{name}', 'Installer\ModuleController@activate')->name('activate'); |
|
| 125 | + Route::get('disable/{name}', 'Installer\ModuleController@disable')->name('disable'); |
|
| 126 | + Route::get('enable/{name}', 'Installer\ModuleController@enable')->name('enable'); |
|
| 127 | + Route::get('get-active', 'Installer\ModuleController@getEnabled')->name('getEnabled'); |
|
| 128 | + Route::get('get-staged', 'Installer\ModuleController@getStaged')->name('getStaged'); |
|
| 129 | + Route::get('/', 'Installer\ModuleController@index')->name('index'); |
|
| 130 | 130 | }); |
| 131 | 131 | // Administrative routes for equipment and equipment categories |
| 132 | - Route::resource('categories', 'Installer\CategoriesController'); |
|
| 133 | - Route::resource('systems', 'Installer\SystemsController'); |
|
| 132 | + Route::resource('categories', 'Installer\CategoriesController'); |
|
| 133 | + Route::resource('systems', 'Installer\SystemsController'); |
|
| 134 | 134 | // Administrative routes for users |
| 135 | - Route::resource('user', 'Admin\UserController'); |
|
| 136 | - Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
| 137 | - Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
| 135 | + Route::resource('user', 'Admin\UserController'); |
|
| 136 | + Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
| 137 | + Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
| 138 | 138 | Route::get('check-user/{name}/{type}', 'Admin\UserController@checkUser') ->name('checkUser'); |
| 139 | - Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
| 140 | - Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
| 141 | - Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
| 142 | - Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
| 143 | - Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
| 144 | - Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
| 139 | + Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
| 140 | + Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
| 141 | + Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
| 142 | + Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
| 143 | + Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
| 144 | + Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
| 145 | 145 | // Tech Bench Settings Routes |
| 146 | - Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
| 147 | - Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
| 148 | - Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
| 149 | - Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
| 150 | - Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
| 151 | - Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
| 152 | - Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
| 146 | + Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
| 147 | + Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
| 148 | + Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
| 149 | + Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
| 150 | + Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
| 151 | + Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
| 152 | + Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
| 153 | 153 | // Tech Bench Backup Routes |
| 154 | - Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
| 155 | - Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
| 156 | - Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
| 157 | - Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
| 158 | - Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
| 154 | + Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
| 155 | + Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
| 156 | + Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
| 157 | + Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
| 158 | + Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
| 159 | 159 | // Admin index route |
| 160 | - Route::get('/', 'Admin\AdminController@index') ->name('index'); |
|
| 160 | + Route::get('/', 'Admin\AdminController@index') ->name('index'); |
|
| 161 | 161 | }); |