@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function up() |
17 | 17 | { |
18 | - Schema::create('user_role_permission_types', function (Blueprint $table) { |
|
18 | + Schema::create('user_role_permission_types', function(Blueprint $table) { |
|
19 | 19 | $table->increments('perm_type_id'); |
20 | 20 | $table->text('description'); |
21 | 21 | $table->timestamps(); |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | |
24 | 24 | // Insert default data |
25 | 25 | DB::table('user_role_permission_types')->insert([ |
26 | - ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
27 | - ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
28 | - ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | - ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | - ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | - ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | - ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | - ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
34 | - ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
35 | - ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
36 | - ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
26 | + ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
27 | + ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
28 | + ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | + ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | + ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | + ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | + ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | + ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
34 | + ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
35 | + ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
36 | + ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
37 | 37 | ]); |
38 | 38 | } |
39 | 39 |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | // Determine if a user can see the Administration Nav Link |
37 | 37 | public function seeAdminLink(User $user) |
38 | 38 | { |
39 | - if ($this->isInstaller($user)) |
|
39 | + if($this->isInstaller($user)) |
|
40 | 40 | { |
41 | 41 | return true; |
42 | 42 | } |
43 | 43 | |
44 | 44 | $data = UserRolePermissions::with('UserRolePermissionTypes') |
45 | - ->whereHas('UserRolePermissionTypes', function ($query) { |
|
45 | + ->whereHas('UserRolePermissionTypes', function($query) { |
|
46 | 46 | $query->where('description', 'Manage Users') |
47 | 47 | ->orWhere('description', 'Manage User Roles') |
48 | 48 | ->orWhere('description', 'Manage Customers') |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | ->get(); |
54 | 54 | |
55 | 55 | $allow = $data->isEmpty() ? 'false' : 'true'; |
56 | - \Log::debug('User ' . $user->full_name . ' is trying to access admin link. Result - ' . $allow); |
|
56 | + \Log::debug('User '.$user->full_name.' is trying to access admin link. Result - '.$allow); |
|
57 | 57 | |
58 | 58 | return $data->isEmpty() ? false : true; |
59 | 59 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | $data = UserRolePermissions::with('UserRolePermissionTypes') |
71 | - ->whereHas('UserRolePermissionTypes', function ($query) use ($task) { |
|
71 | + ->whereHas('UserRolePermissionTypes', function($query) use ($task) { |
|
72 | 72 | $query->where('description', $task); |
73 | 73 | }) |
74 | 74 | ->where('role_id', $user->role_id) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ->get(); |
77 | 77 | |
78 | 78 | $allow = $data->isEmpty() ? 'false' : 'true'; |
79 | - \Log::debug('User '.$user->full_name.' is trying to access '.$task.'. Result - ' . $allow); |
|
79 | + \Log::debug('User '.$user->full_name.' is trying to access '.$task.'. Result - '.$allow); |
|
80 | 80 | |
81 | 81 | return $data->isEmpty() ? false : true; |
82 | 82 | } |
@@ -135,14 +135,14 @@ discard block |
||
135 | 135 | // Validate the hash token |
136 | 136 | $user = UserInitialize::where('token', $hash)->get(); |
137 | 137 | |
138 | - if ($user->isEmpty()) { |
|
139 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
140 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
|
138 | + if($user->isEmpty()) { |
|
139 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
140 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to access invalid initialize hash - '.$hash); |
|
141 | 141 | return abort(404); |
142 | 142 | } |
143 | 143 | |
144 | - Log::debug('Route ' . Route::currentRouteName() . ' visited.'); |
|
145 | - Log::debug('Link Hash -' . $hash); |
|
144 | + Log::debug('Route '.Route::currentRouteName().' visited.'); |
|
145 | + Log::debug('Link Hash -'.$hash); |
|
146 | 146 | return view('account.initializeUser', ['hash' => $hash]); |
147 | 147 | } |
148 | 148 | |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | { |
152 | 152 | // Verify that the link matches the assigned email address |
153 | 153 | $valid = UserInitialize::where('token', $hash)->first(); |
154 | - if (empty($valid)) { |
|
155 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
156 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
|
154 | + if(empty($valid)) { |
|
155 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
156 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to submit an invalid User Initialization link - '.$hash); |
|
157 | 157 | return abort(404); |
158 | 158 | } |
159 | 159 | |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | Auth::loginUsingID($userData->user_id); |
187 | 187 | |
188 | 188 | // Redirect the user to the dashboard |
189 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
190 | - Log::debug('Initialize Data - ' . $request->toArray()); |
|
189 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
190 | + Log::debug('Initialize Data - '.$request->toArray()); |
|
191 | 191 | Log::notice('User has setup account', ['user_id' => $userData->user_id]); |
192 | 192 | return redirect(route('dashboard')); |
193 | 193 | } |
@@ -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); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $table->longText('comment'); |
21 | 21 | $table->timestamps(); |
22 | 22 | $table->foreign('tip_id')->references('tip_id')->on('tech_tips')->onUpdate('cascade')->onDelete('cascade'); |
23 | - $table->foreign('user_id')->references('user_id')->on('users')->onUpdate('cascade'); // TODO - add this key in v5 updates if it does not exist |
|
23 | + $table->foreign('user_id')->references('user_id')->on('users')->onUpdate('cascade'); // TODO - add this key in v5 updates if it does not exist |
|
24 | 24 | }); |
25 | 25 | } |
26 | 26 |
@@ -181,12 +181,18 @@ discard block |
||
181 | 181 | |
182 | 182 | // Good to go - update user password |
183 | 183 | $roleArr = []; |
184 | - foreach ($roles as $role) { |
|
185 | - if ($role->role_id == 1 && Auth::user()->role_id != 1) { |
|
184 | + foreach ($roles as $role) |
|
185 | + { |
|
186 | + if ($role->role_id == 1 && Auth::user()->role_id != 1) |
|
187 | + { |
|
186 | 188 | continue; |
187 | - } else if ($role->role_id == 2 && Auth::user()->role_id > 1) { |
|
189 | + } |
|
190 | + else if ($role->role_id == 2 && Auth::user()->role_id > 1) |
|
191 | + { |
|
188 | 192 | continue; |
189 | - } else { |
|
193 | + } |
|
194 | + else |
|
195 | + { |
|
190 | 196 | // $roleArr[$role->role_id] = $role->name; |
191 | 197 | $roleArr[] = [ |
192 | 198 | 'value' => $role->role_id, |
@@ -275,17 +281,20 @@ discard block |
||
275 | 281 | $user = User::find($request->user_id); |
276 | 282 | |
277 | 283 | // Verify this is a valid user ID |
278 | - if (!$user) { |
|
284 | + if (!$user) |
|
285 | + { |
|
279 | 286 | $success = false; |
280 | 287 | $reason = 'Cannot find user with this ID'; |
281 | 288 | } |
282 | 289 | // Make sure that the user is not trying to deactivate someone with more permissions |
283 | - else if ($user->role_id < Auth::user()->role_id) { |
|
290 | + else if ($user->role_id < Auth::user()->role_id) |
|
291 | + { |
|
284 | 292 | $success = false; |
285 | 293 | $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.'; |
286 | 294 | } |
287 | 295 | // Good to go - update user password |
288 | - else { |
|
296 | + else |
|
297 | + { |
|
289 | 298 | // Update the user data |
290 | 299 | $user->update( |
291 | 300 | [ |
@@ -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, |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | { |
107 | 107 | // Validate the new user form |
108 | 108 | $request->validate([ |
109 | - 'role' => 'required|numeric', // TODO - add validation rule - is in user roles table |
|
109 | + 'role' => 'required|numeric', // TODO - add validation rule - is in user roles table |
|
110 | 110 | 'username' => 'required|unique:users|regex:/^[a-zA-Z0-9_]*$/', |
111 | 111 | 'first_name' => 'required', |
112 | 112 | 'last_name' => 'required', |
@@ -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 | ]); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function __construct() |
16 | 16 | { |
17 | 17 | $this->middleware('auth'); |
18 | - $this->middleware(function ($request, $next) { |
|
18 | + $this->middleware(function($request, $next) { |
|
19 | 19 | $this->authorize('hasAccess', 'Manage Equipment'); |
20 | 20 | return $next($request); |
21 | 21 | }); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | SystemCategories::find($id)->delete(); |
122 | 122 | return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']); |
123 | 123 | } |
124 | - catch (\Illuminate\Database\QueryException $e) |
|
124 | + catch(\Illuminate\Database\QueryException $e) |
|
125 | 125 | { |
126 | 126 | return response()->json(['success' => false, 'reason' => 'Category still in use. You must delete all systems attached to this category first.']); |
127 | 127 | } |
@@ -77,7 +77,8 @@ |
||
77 | 77 | // Delete an existing category - note this will fail if the category has systems assigned to it |
78 | 78 | public function destroy($id) |
79 | 79 | { |
80 | - try { |
|
80 | + try |
|
81 | + { |
|
81 | 82 | SystemCategories::find($id)->delete(); |
82 | 83 | return response()->json(['success' => true, 'reason' => 'Category Successfully Deleted']); |
83 | 84 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | // Database primary key |
22 | 22 | protected $primaryKey = 'user_id'; |
23 | 23 | |
24 | - protected $appends = [ 'full_name' ]; |
|
24 | + protected $appends = ['full_name']; |
|
25 | 25 | protected $casts = [ |
26 | 26 | 'created_at' => 'datetime:M d, Y', |
27 | 27 | 'updated_at' => 'datetime:M d, Y', |
@@ -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,46 +75,46 @@ 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 | |
120 | 120 | |
@@ -137,35 +137,35 @@ discard block |
||
137 | 137 | |
138 | 138 | // Administrative routes for equipment and equipment categories |
139 | 139 | Route::resource('categories', 'Installer\CategoriesController'); |
140 | - Route::resource('systems', 'Installer\SystemsController'); |
|
140 | + Route::resource('systems', 'Installer\SystemsController'); |
|
141 | 141 | |
142 | 142 | |
143 | 143 | |
144 | 144 | // Administrative routes for users |
145 | - Route::resource('user', 'Admin\UserController'); |
|
146 | - Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
147 | - Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
145 | + Route::resource('user', 'Admin\UserController'); |
|
146 | + Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
147 | + Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
148 | 148 | Route::get('check-user/{name}/{type}', 'Admin\UserController@checkUser') ->name('checkUser'); |
149 | - Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
150 | - Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
151 | - Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
152 | - Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
153 | - Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
154 | - Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
149 | + Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
150 | + Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
151 | + Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
152 | + Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
153 | + Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
154 | + Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
155 | 155 | // Tech Bench Settings Routes |
156 | - Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
157 | - Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
158 | - Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
159 | - Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
160 | - Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
161 | - Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
162 | - Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
156 | + Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
157 | + Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
158 | + Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
159 | + Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
160 | + Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
161 | + Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
162 | + Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
163 | 163 | // Tech Bench Backup Routes |
164 | - Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
165 | - Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
166 | - Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
167 | - Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
168 | - Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
164 | + Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
165 | + Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
166 | + Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
167 | + Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
168 | + Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
169 | 169 | |
170 | 170 | // Admin index route |
171 | 171 | Route::get('/', 'Admin\AdminController@index')->name('index'); |