@@ -5,7 +5,7 @@ |
||
5 | 5 | use App\UserRolePermissionTypes; |
6 | 6 | use Faker\Generator as Faker; |
7 | 7 | |
8 | -$factory->define(UserRolePermissionTypes::class, function (Faker $faker) { |
|
8 | +$factory->define(UserRolePermissionTypes::class, function(Faker $faker) { |
|
9 | 9 | return [ |
10 | 10 | // |
11 | 11 | 'description' => $faker->words(2, true), |
@@ -116,7 +116,7 @@ |
||
116 | 116 | |
117 | 117 | |
118 | 118 | |
119 | - // // System custionization settings |
|
119 | + // // System custionization settings |
|
120 | 120 | // Route::get('system-customization', 'Installer\SettingsController@customizeSystem')->name('customize'); |
121 | 121 | // Route::post('system-customization', 'Installer\SettingsController@submitCustomizeSystem')->name('customize'); |
122 | 122 | // Route::post('new-logo', 'Installer\SettingsController@submitLogo')->name('submitLogo'); |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | /* |
47 | 47 | * File Link Routes |
48 | 48 | */ |
49 | -Route::prefix('links')->name('links.')->group(function () |
|
50 | -{ |
|
49 | +Route::prefix('links')->name('links.')->group(function () { |
|
51 | 50 | // Resource controllers for base access |
52 | 51 | Route::resource('data', 'FileLinks\FileLinksController'); |
53 | 52 | Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | /* |
73 | 72 | * Customer Routes |
74 | 73 | */ |
75 | -Route::prefix('customer')->name('customer.')->group(function() |
|
76 | -{ |
|
74 | +Route::prefix('customer')->name('customer.')->group(function() { |
|
77 | 75 | // Customer Files |
78 | 76 | Route::resource('files', 'Customers\CustomerFilesController'); |
79 | 77 | // Custome Notes |
@@ -99,8 +97,7 @@ discard block |
||
99 | 97 | */ |
100 | 98 | Route::resource('tips', 'TechTips\TechTipsController'); |
101 | 99 | Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
102 | -Route::prefix('tip')->name('tip.')->group(function() |
|
103 | -{ |
|
100 | +Route::prefix('tip')->name('tip.')->group(function() { |
|
104 | 101 | Route::resource('comments', 'TechTips\TechTipCommentsController'); |
105 | 102 | Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
106 | 103 | Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
@@ -112,8 +109,7 @@ discard block |
||
112 | 109 | /* |
113 | 110 | * Administration Routes |
114 | 111 | */ |
115 | -Route::prefix('admin')->name('admin.')->group(function () |
|
116 | -{ |
|
112 | +Route::prefix('admin')->name('admin.')->group(function () { |
|
117 | 113 | |
118 | 114 | |
119 | 115 |
@@ -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,44 +75,44 @@ 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('id/{id}/{name}', 'Customers\CustomerDetailsController@details')->name('details'); |
|
88 | - Route::resource('id', 'Customers\CustomerDetailsController'); |
|
87 | + Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details')->name('details'); |
|
88 | + Route::resource('id', 'Customers\CustomerDetailsController'); |
|
89 | 89 | // check Id and bookmark customer |
90 | 90 | Route::get('toggle-fav/{action}/{custID}', 'Customers\CustomerController@toggleFav') ->name('toggle-fav'); |
91 | - Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
91 | + Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
92 | 92 | // Index landing/search page |
93 | - Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
94 | - Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
93 | + Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
94 | + Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
95 | 95 | }); |
96 | 96 | |
97 | 97 | /* |
98 | 98 | * Tech Tip Routes |
99 | 99 | */ |
100 | -Route::resource('tips', 'TechTips\TechTipsController'); |
|
101 | -Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
100 | +Route::resource('tips', 'TechTips\TechTipsController'); |
|
101 | +Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
102 | 102 | Route::prefix('tip')->name('tip.')->group(function() |
103 | 103 | { |
104 | - Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
105 | - Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
106 | - Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
107 | - Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
104 | + Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
105 | + Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
106 | + Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
107 | + Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
108 | 108 | Route::get('toggle-fav/{action}/{tipID}', 'TechTips\TechTipsController@toggleFav') ->name('toggle-fav'); |
109 | - Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
109 | + Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
110 | 110 | }); |
111 | 111 | |
112 | 112 | /* |
113 | 113 | * Administration Routes |
114 | 114 | */ |
115 | -Route::prefix('admin')->name('admin.')->group(function () |
|
115 | +Route::prefix('admin')->name('admin.')->group(function() |
|
116 | 116 | { |
117 | 117 | |
118 | 118 | |
@@ -131,26 +131,26 @@ discard block |
||
131 | 131 | |
132 | 132 | // Administrative routes for equipment and equipment categories |
133 | 133 | Route::resource('categories', 'Installer\CategoriesController'); |
134 | - Route::resource('systems', 'Installer\SystemsController'); |
|
134 | + Route::resource('systems', 'Installer\SystemsController'); |
|
135 | 135 | |
136 | 136 | |
137 | 137 | |
138 | 138 | // Administrative routes for users |
139 | - Route::resource('user', 'Admin\UserController'); |
|
140 | - Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
141 | - Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
139 | + Route::resource('user', 'Admin\UserController'); |
|
140 | + Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
141 | + Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
142 | 142 | Route::get('check-user/{name}/{type}', 'Admin\UserController@checkUser') ->name('checkUser'); |
143 | - Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
144 | - Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
145 | - Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
146 | - Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
147 | - Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
148 | - Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
143 | + Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
144 | + Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
145 | + Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
146 | + Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
147 | + Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
148 | + Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
149 | 149 | // Tech Benc Settings Routes |
150 | - Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
151 | - Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
152 | - Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
153 | - Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
150 | + Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
151 | + Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
152 | + Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
153 | + Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
154 | 154 | |
155 | 155 | Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings') ->name('emailSettings'); |
156 | 156 | Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use App\UserRolePermissions; |
6 | 6 | use Faker\Generator as Faker; |
7 | 7 | |
8 | -$factory->define(UserRolePermissions::class, function () { |
|
8 | +$factory->define(UserRolePermissions::class, function() { |
|
9 | 9 | return [ |
10 | 10 | // |
11 | 11 | 'role_id' => factory(App\UserRoleType::class)->create()->role_id, |
@@ -209,10 +209,10 @@ discard block |
||
209 | 209 | } |
210 | 210 | |
211 | 211 | // Delete an existing system - note this will fail if the system has any customers or tech tips assigned to it |
212 | - public function destroy($id) |
|
213 | - { |
|
214 | - // |
|
215 | - try { |
|
212 | + public function destroy($id) |
|
213 | + { |
|
214 | + // |
|
215 | + try { |
|
216 | 216 | SystemTypes::find($id)->delete(); |
217 | 217 | return response()->json(['success' => true, 'reason' => 'Equipment Successfully Deleted']); |
218 | 218 | } |
@@ -220,5 +220,5 @@ discard block |
||
220 | 220 | { |
221 | 221 | return response()->json(['success' => false, 'reason' => 'Cannot delete this equipment. It has Customers or Tech Tips assigned to it. Please delete those first.']); |
222 | 222 | } |
223 | - } |
|
223 | + } |
|
224 | 224 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function __construct() |
19 | 19 | { |
20 | 20 | $this->middleware('auth'); |
21 | - $this->middleware(function ($request, $next) { |
|
21 | + $this->middleware(function($request, $next) { |
|
22 | 22 | $this->authorize('hasAccess', 'Manage Equipment'); |
23 | 23 | return $next($request); |
24 | 24 | }); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $fields = SystemDataFieldTypes::all(); |
121 | 121 | $cat = SystemCategories::where('name', str_replace('-', ' ', $cat))->first(); |
122 | 122 | |
123 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
123 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
124 | 124 | return view('installer.newSystem', [ |
125 | 125 | 'cat' => $cat, |
126 | 126 | 'dataList' => $fields, |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $query->join('system_data_field_types', 'system_data_fields.data_type_id', '=', 'system_data_field_types.data_type_id'); |
137 | 137 | }])->withCount('SystemDataFields')->first(); |
138 | 138 | |
139 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
139 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
140 | 140 | return view('installer.editSystem', [ |
141 | 141 | 'system' => $system, |
142 | 142 | 'dataList' => $fields, |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | SystemTypes::find($id)->delete(); |
217 | 217 | return response()->json(['success' => true, 'reason' => 'Equipment Successfully Deleted']); |
218 | 218 | } |
219 | - catch (\Illuminate\Database\QueryException $e) |
|
219 | + catch(\Illuminate\Database\QueryException $e) |
|
220 | 220 | { |
221 | 221 | return response()->json(['success' => false, 'reason' => 'Cannot delete this equipment. It has Customers or Tech Tips assigned to it. Please delete those first.']); |
222 | 222 | } |
@@ -131,8 +131,7 @@ discard block |
||
131 | 131 | public function edit($id) |
132 | 132 | { |
133 | 133 | $fields = SystemDataFieldTypes::all(); |
134 | - $system = SystemTypes::where('sys_id', $id)->with(['SystemDataFields' => function($query) |
|
135 | - { |
|
134 | + $system = SystemTypes::where('sys_id', $id)->with(['SystemDataFields' => function($query) { |
|
136 | 135 | $query->join('system_data_field_types', 'system_data_fields.data_type_id', '=', 'system_data_field_types.data_type_id'); |
137 | 136 | }])->withCount('SystemDataFields')->first(); |
138 | 137 | |
@@ -212,7 +211,8 @@ discard block |
||
212 | 211 | public function destroy($id) |
213 | 212 | { |
214 | 213 | // |
215 | - try { |
|
214 | + try |
|
215 | + { |
|
216 | 216 | SystemTypes::find($id)->delete(); |
217 | 217 | return response()->json(['success' => true, 'reason' => 'Equipment Successfully Deleted']); |
218 | 218 | } |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | |
40 | 40 | Settings::firstOrCreate( |
41 | 41 | ['key' => 'app.logo'], |
42 | - ['key' => 'app.logo', 'value' => '/storage/img/' . $fileName] |
|
43 | - )->update(['value' => '/storage/img/' . $fileName]); |
|
42 | + ['key' => 'app.logo', 'value' => '/storage/img/'.$fileName] |
|
43 | + )->update(['value' => '/storage/img/'.$fileName]); |
|
44 | 44 | |
45 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
45 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
46 | 46 | Log::debug('Submitted Data - ', $request->toArray()); |
47 | - Log::notice('A new company logo has been uploaded by User ID-' . Auth::user()->user_id); |
|
47 | + Log::notice('A new company logo has been uploaded by User ID-'.Auth::user()->user_id); |
|
48 | 48 | |
49 | - return response()->json(['url' => '/storage/img/' . $fileName]); |
|
49 | + return response()->json(['url' => '/storage/img/'.$fileName]); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function configuration() |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | )->update(['value' => $request->url]); |
82 | 82 | } |
83 | 83 | // Update the site timezone |
84 | - if (config('app.timezone') !== $request->timezone) { |
|
84 | + if(config('app.timezone') !== $request->timezone) { |
|
85 | 85 | Settings::firstOrCreate( |
86 | 86 | ['key' => 'app.timezone'], |
87 | 87 | ['key' => 'app.timezone', 'value' => $request->timezone] |
88 | 88 | )->update(['value' => $request->timezone]); |
89 | 89 | } |
90 | 90 | // Update the maximum file upload size |
91 | - if (config('filesystems.paths.max_size') !== $request->filesize) { |
|
91 | + if(config('filesystems.paths.max_size') !== $request->filesize) { |
|
92 | 92 | Settings::firstOrCreate( |
93 | 93 | ['key' => 'filesystems.paths.max_size'], |
94 | 94 | ['key' => 'filesystems.paths.max_size', 'value' => $request->filesize] |
@@ -81,14 +81,16 @@ |
||
81 | 81 | )->update(['value' => $request->url]); |
82 | 82 | } |
83 | 83 | // Update the site timezone |
84 | - if (config('app.timezone') !== $request->timezone) { |
|
84 | + if (config('app.timezone') !== $request->timezone) |
|
85 | + { |
|
85 | 86 | Settings::firstOrCreate( |
86 | 87 | ['key' => 'app.timezone'], |
87 | 88 | ['key' => 'app.timezone', 'value' => $request->timezone] |
88 | 89 | )->update(['value' => $request->timezone]); |
89 | 90 | } |
90 | 91 | // Update the maximum file upload size |
91 | - if (config('filesystems.paths.max_size') !== $request->filesize) { |
|
92 | + if (config('filesystems.paths.max_size') !== $request->filesize) |
|
93 | + { |
|
92 | 94 | Settings::firstOrCreate( |
93 | 95 | ['key' => 'filesystems.paths.max_size'], |
94 | 96 | ['key' => 'filesystems.paths.max_size', 'value' => $request->filesize] |
@@ -25,7 +25,7 @@ |
||
25 | 25 | if(Auth::user()->password_expires !== null) |
26 | 26 | { |
27 | 27 | $passExp = new Carbon((Auth::user()->password_expires)); |
28 | - if(Carbon::now() > $passExp ) |
|
28 | + if(Carbon::now() > $passExp) |
|
29 | 29 | { |
30 | 30 | Log::notice('User ID-'.Auth::user()->user_id.' is being forced to change their password.'); |
31 | 31 | $request->session()->flash('change_password', 'change_password'); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | // Show the links for the selected user |
56 | 56 | public function showLinks($id) |
57 | 57 | { |
58 | - $user = User::find($id); |
|
58 | + $user = User::find($id); |
|
59 | 59 | |
60 | 60 | Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
61 | 61 | return view('admin.linkDetails', [ |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | )->update(['value' => $request->passExpire]); |
89 | 89 | |
90 | 90 | // If the setting is changing from never to xx days, update all users |
91 | - if ($request->passExpire == 0) { |
|
91 | + if($request->passExpire == 0) { |
|
92 | 92 | User::whereNotNull('password_expires')->update([ |
93 | 93 | 'password_expires' => null |
94 | 94 | ]); |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | ]); |
102 | 102 | } |
103 | 103 | |
104 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
104 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
105 | 105 | Log::debug('Submitted Data - ', $request->toArray()); |
106 | - Log::notice('User Settings have been changed by User ID-' . Auth::user()->user_id); |
|
106 | + Log::notice('User Settings have been changed by User ID-'.Auth::user()->user_id); |
|
107 | 107 | return redirect()->back()->with('success', 'User Security Updated'); |
108 | 108 | } |
109 | 109 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | 'name' => $request->name, |
163 | 163 | 'description' => $request->description, |
164 | 164 | ]); |
165 | - foreach ($request->permissions as $perm) |
|
165 | + foreach($request->permissions as $perm) |
|
166 | 166 | { |
167 | 167 | UserRolePermissions::create([ |
168 | 168 | 'role_id' => $role->role_id, |
@@ -37,8 +37,7 @@ discard block |
||
37 | 37 | $userLinks = new UserCollection( |
38 | 38 | User::withCount([ |
39 | 39 | 'FileLinks', |
40 | - 'FileLinks as expired_file_links_count' => function($query) |
|
41 | - { |
|
40 | + 'FileLinks as expired_file_links_count' => function($query) { |
|
42 | 41 | $query->where('expire', '<', Carbon::now()); |
43 | 42 | } |
44 | 43 | ]) |
@@ -88,7 +87,8 @@ discard block |
||
88 | 87 | )->update(['value' => $request->passExpire]); |
89 | 88 | |
90 | 89 | // If the setting is changing from never to xx days, update all users |
91 | - if ($request->passExpire == 0) { |
|
90 | + if ($request->passExpire == 0) |
|
91 | + { |
|
92 | 92 | User::whereNotNull('password_expires')->update([ |
93 | 93 | 'password_expires' => null |
94 | 94 | ]); |
@@ -110,8 +110,7 @@ discard block |
||
110 | 110 | public function roleSettings() |
111 | 111 | { |
112 | 112 | $this->authorize('hasAccess', 'Manage User Roles'); |
113 | - $roles = UserRoleType::with(['UserRolePermissions' => function($query) |
|
114 | - { |
|
113 | + $roles = UserRoleType::with(['UserRolePermissions' => function($query) { |
|
115 | 114 | $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id'); |
116 | 115 | }])->get(); |
117 | 116 | $perms = UserRolePermissionTypes::all(); |