@@ -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 | ]; |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | // Validate the hash token |
28 | 28 | $user = UserInitialize::where('token', $hash)->get(); |
29 | 29 | |
30 | - if ($user->isEmpty()) { |
|
31 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
32 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
|
30 | + if($user->isEmpty()) { |
|
31 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
32 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to access invalid initialize hash - '.$hash); |
|
33 | 33 | return abort(404); |
34 | 34 | } |
35 | 35 | |
36 | - Log::debug('Route ' . Route::currentRouteName() . ' visited.'); |
|
37 | - Log::debug('Link Hash -' . $hash); |
|
36 | + Log::debug('Route '.Route::currentRouteName().' visited.'); |
|
37 | + Log::debug('Link Hash -'.$hash); |
|
38 | 38 | return view('account.initializeUser', ['hash' => $hash]); |
39 | 39 | } |
40 | 40 | |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | { |
44 | 44 | // Verify that the link matches the assigned email address |
45 | 45 | $valid = UserInitialize::where('token', $hash)->first(); |
46 | - if (empty($valid)) { |
|
47 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
48 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
|
46 | + if(empty($valid)) { |
|
47 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
48 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to submit an invalid User Initialization link - '.$hash); |
|
49 | 49 | return abort(404); |
50 | 50 | } |
51 | 51 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | Auth::loginUsingID($userData->user_id); |
79 | 79 | |
80 | 80 | // Redirect the user to the dashboard |
81 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
81 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
82 | 82 | Log::debug('Initialize Data - ', $request->toArray()); |
83 | 83 | Log::notice('User has setup account', ['user_id' => $userData->user_id]); |
84 | 84 | return redirect(route('dashboard')); |
@@ -135,7 +135,8 @@ discard block |
||
135 | 135 | // Validate the hash token |
136 | 136 | $user = UserInitialize::where('token', $hash)->get(); |
137 | 137 | |
138 | - if ($user->isEmpty()) { |
|
138 | + if ($user->isEmpty()) |
|
139 | + { |
|
139 | 140 | Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
140 | 141 | Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
141 | 142 | return abort(404); |
@@ -151,7 +152,8 @@ discard block |
||
151 | 152 | { |
152 | 153 | // Verify that the link matches the assigned email address |
153 | 154 | $valid = UserInitialize::where('token', $hash)->first(); |
154 | - if (empty($valid)) { |
|
155 | + if (empty($valid)) |
|
156 | + { |
|
155 | 157 | Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
156 | 158 | Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
157 | 159 | return abort(404); |
@@ -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 | } |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | |
42 | 42 | Settings::firstOrCreate( |
43 | 43 | ['key' => 'app.logo'], |
44 | - ['key' => 'app.logo', 'value' => '/storage/img/' . $fileName] |
|
45 | - )->update(['value' => '/storage/img/' . $fileName]); |
|
44 | + ['key' => 'app.logo', 'value' => '/storage/img/'.$fileName] |
|
45 | + )->update(['value' => '/storage/img/'.$fileName]); |
|
46 | 46 | |
47 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
47 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
48 | 48 | Log::debug('Submitted Data - ', $request->toArray()); |
49 | - Log::notice('A new company logo has been uploaded by User ID-' . Auth::user()->user_id); |
|
49 | + Log::notice('A new company logo has been uploaded by User ID-'.Auth::user()->user_id); |
|
50 | 50 | |
51 | - return response()->json(['url' => '/storage/img/' . $fileName]); |
|
51 | + return response()->json(['url' => '/storage/img/'.$fileName]); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | public function configuration() |
@@ -74,14 +74,14 @@ discard block |
||
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 | Settings::firstOrCreate( |
79 | 79 | ['key' => 'app.timezone'], |
80 | 80 | ['key' => 'app.timezone', 'value' => $request->timezone] |
81 | 81 | )->update(['value' => $request->timezone]); |
82 | 82 | } |
83 | 83 | // Update the maximum file upload size |
84 | - if (config('filesystems.paths.max_size') !== $request->filesize) { |
|
84 | + if(config('filesystems.paths.max_size') !== $request->filesize) { |
|
85 | 85 | Settings::firstOrCreate( |
86 | 86 | ['key' => 'filesystems.paths.max_size'], |
87 | 87 | ['key' => 'filesystems.paths.max_size', 'value' => $request->filesize] |
@@ -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] |
@@ -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) |
@@ -128,7 +128,7 @@ discard block |
||
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 | $request->cust_id = $details->parent_id; |
133 | 133 | } |
134 | 134 |
@@ -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 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // Determine if the note should go to the customer, or its parent |
31 | 31 | $details = Customers::find($request->cust_id); |
32 | - if ($details->parent_id && $request->shared == 'true') { |
|
32 | + if($details->parent_id && $request->shared == 'true') { |
|
33 | 33 | $request->cust_id = $details->parent_id; |
34 | 34 | } |
35 | 35 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | // Determine if there is a parent site with shared contacts |
57 | 57 | $parent = Customers::find($id)->parent_id; |
58 | - if ($parent) { |
|
58 | + if($parent) { |
|
59 | 59 | $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get(); |
60 | 60 | |
61 | 61 | $notes = $notes->merge($parentList); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ]); |
77 | 77 | |
78 | 78 | $details = Customers::find($request->cust_id); |
79 | - if ($details->parent_id && $request->shared == 'true') { |
|
79 | + if($details->parent_id && $request->shared == 'true') { |
|
80 | 80 | $request->cust_id = $details->parent_id; |
81 | 81 | } |
82 | 82 |
@@ -29,7 +29,8 @@ discard block |
||
29 | 29 | |
30 | 30 | // Determine if the note should go to the customer, or its parent |
31 | 31 | $details = Customers::find($request->cust_id); |
32 | - if ($details->parent_id && $request->shared == 'true') { |
|
32 | + if ($details->parent_id && $request->shared == 'true') |
|
33 | + { |
|
33 | 34 | $request->cust_id = $details->parent_id; |
34 | 35 | } |
35 | 36 | |
@@ -55,7 +56,8 @@ discard block |
||
55 | 56 | |
56 | 57 | // Determine if there is a parent site with shared contacts |
57 | 58 | $parent = Customers::find($id)->parent_id; |
58 | - if ($parent) { |
|
59 | + if ($parent) |
|
60 | + { |
|
59 | 61 | $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get(); |
60 | 62 | |
61 | 63 | $notes = $notes->merge($parentList); |
@@ -76,7 +78,8 @@ discard block |
||
76 | 78 | ]); |
77 | 79 | |
78 | 80 | $details = Customers::find($request->cust_id); |
79 | - if ($details->parent_id && $request->shared == 'true') { |
|
81 | + if ($details->parent_id && $request->shared == 'true') |
|
82 | + { |
|
80 | 83 | $request->cust_id = $details->parent_id; |
81 | 84 | } |
82 | 85 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // Verify that the upload is valid and being processed |
38 | 38 | if($receiver->isUploaded() === false) |
39 | 39 | { |
40 | - Log::error('Upload File Missing - ' . |
|
40 | + Log::error('Upload File Missing - '. |
|
41 | 41 | /** @scrutinizer ignore-type */ |
42 | 42 | $request->toArray()); |
43 | 43 | throw new UploadMissingFileException(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | { |
52 | 52 | // Determine if the note should go to the customer, or its parent |
53 | 53 | $details = Customers::find($request->cust_id); |
54 | - if ($details->parent_id && $request->shared == 'true') |
|
54 | + if($details->parent_id && $request->shared == 'true') |
|
55 | 55 | { |
56 | 56 | $request->cust_id = $details->parent_id; |
57 | 57 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | // Determine if there is a parent site with shared files |
113 | 113 | $parent = Customers::find($id)->parent_id; |
114 | - if ($parent) { |
|
114 | + if($parent) { |
|
115 | 115 | $parentList = Customerfiles::where('cust_id', $parent) |
116 | 116 | ->where('shared', 1) |
117 | 117 | ->with('Files') |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ]); |
136 | 136 | |
137 | 137 | $details = Customers::find($request->cust_id); |
138 | - if ($details->parent_id && $request->shared == 1) { |
|
138 | + if($details->parent_id && $request->shared == 1) { |
|
139 | 139 | $request->cust_id = $details->parent_id; |
140 | 140 | } |
141 | 141 |
@@ -111,7 +111,8 @@ discard block |
||
111 | 111 | |
112 | 112 | // Determine if there is a parent site with shared files |
113 | 113 | $parent = Customers::find($id)->parent_id; |
114 | - if ($parent) { |
|
114 | + if ($parent) |
|
115 | + { |
|
115 | 116 | $parentList = Customerfiles::where('cust_id', $parent) |
116 | 117 | ->where('shared', 1) |
117 | 118 | ->with('Files') |
@@ -135,7 +136,8 @@ discard block |
||
135 | 136 | ]); |
136 | 137 | |
137 | 138 | $details = Customers::find($request->cust_id); |
138 | - if ($details->parent_id && $request->shared == 1) { |
|
139 | + if ($details->parent_id && $request->shared == 1) |
|
140 | + { |
|
139 | 141 | $request->cust_id = $details->parent_id; |
140 | 142 | } |
141 | 143 |