@@ -54,15 +54,13 @@ discard block |
||
54 | 54 | * Logged in user routes |
55 | 55 | * |
56 | 56 | */ |
57 | -Route::middleware(['password_expired'])->group(function() |
|
58 | -{ |
|
57 | +Route::middleware(['password_expired'])->group(function() { |
|
59 | 58 | /* |
60 | 59 | * |
61 | 60 | * Routes for users with "tech" permissions |
62 | 61 | * |
63 | 62 | */ |
64 | - Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() |
|
65 | - { |
|
63 | + Route::group(['middleware' => 'roles', 'roles' => ['tech', 'report', 'admin', 'installer']], function() { |
|
66 | 64 | /* |
67 | 65 | * |
68 | 66 | * Dashboard and About page routes |
@@ -86,8 +84,7 @@ discard block |
||
86 | 84 | * File Link Routes |
87 | 85 | * |
88 | 86 | */ |
89 | - Route::prefix('links')->name('links.')->group(function() |
|
90 | - { |
|
87 | + Route::prefix('links')->name('links.')->group(function() { |
|
91 | 88 | // Resource controllers for base access |
92 | 89 | Route::resource('data', 'FileLinks\FileLinksController'); |
93 | 90 | Route::get('find/{id}', 'FileLinks\FileLinksController@find')->name('user'); |
@@ -115,8 +112,7 @@ discard block |
||
115 | 112 | * System Routes |
116 | 113 | * |
117 | 114 | */ |
118 | - Route::prefix('system')->name('system.')->group(function() |
|
119 | - { |
|
115 | + Route::prefix('system')->name('system.')->group(function() { |
|
120 | 116 | Route::post('system-files/replace', 'Systems\SystemFilesController@replace')->name('replaceFile'); |
121 | 117 | Route::resource('system-files', 'Systems\SystemFilesController'); |
122 | 118 | Route::get('{cat}/{sys}', 'Systems\SystemsController@details')->name('details'); |
@@ -139,8 +135,7 @@ discard block |
||
139 | 135 | * Customer Routes |
140 | 136 | * |
141 | 137 | */ |
142 | - Route::prefix('customer')->name('customer.')->group(function() |
|
143 | - { |
|
138 | + Route::prefix('customer')->name('customer.')->group(function() { |
|
144 | 139 | |
145 | 140 | Route::get('search-id/{id}', 'CustomerController@searchID')->name('searchID'); |
146 | 141 | Route::get('file-types', 'CustomerFilesController@getFileTypes')->name('getFileTypes'); |
@@ -162,12 +157,10 @@ discard block |
||
162 | 157 | * Administration Routes |
163 | 158 | * |
164 | 159 | */ |
165 | - Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() |
|
166 | - { |
|
160 | + Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() { |
|
167 | 161 | |
168 | 162 | |
169 | - Route::prefix('admin')->name('admin.')->group(function() |
|
170 | - { |
|
163 | + Route::prefix('admin')->name('admin.')->group(function() { |
|
171 | 164 | // Admin User File Links routes |
172 | 165 | Route::get('links/show/{id}', 'Admin\AdminController@showLinks')->name('userLinks'); |
173 | 166 | Route::get('count-links', 'Admin\AdminController@countLinks')->name('countLinks'); |
@@ -197,10 +190,8 @@ discard block |
||
197 | 190 | * Installer Routes |
198 | 191 | * |
199 | 192 | */ |
200 | - Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() |
|
201 | - { |
|
202 | - Route::prefix('installer')->name('installer.')->group(function() |
|
203 | - { |
|
193 | + Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() { |
|
194 | + Route::prefix('installer')->name('installer.')->group(function() { |
|
204 | 195 | // User Settings |
205 | 196 | Route::get('user-security-settings', 'Installer\SettingsController@userSecurity')->name('userSecurity'); |
206 | 197 | Route::post('user-security-settings', 'Installer\SettingsController@submitUserSecurity')->name('userSecurity'); |
@@ -3,14 +3,14 @@ |
||
3 | 3 | use Illuminate\Support\Str; |
4 | 4 | use Faker\Generator as Faker; |
5 | 5 | |
6 | -$factory->define(App\Files::class, function (Faker $faker) { |
|
6 | +$factory->define(App\Files::class, function(Faker $faker) { |
|
7 | 7 | return [ |
8 | 8 | 'file_name' => Str::random(5).$faker->fileExtension, |
9 | 9 | 'file_link' => 'random/path' |
10 | 10 | ]; |
11 | 11 | }); |
12 | 12 | |
13 | -$factory->define(App\SystemFiles::class, function (Faker $faker) use ($factory) { |
|
13 | +$factory->define(App\SystemFiles::class, function(Faker $faker) use ($factory) { |
|
14 | 14 | return [ |
15 | 15 | 'sys_id' => 1, |
16 | 16 | 'type_id' => 1, |
@@ -39,8 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | // Get the types of systems belonging to the category |
42 | - $sysList = SystemTypes::whereHas('SystemCategories', function($q) use($cat) |
|
43 | - { |
|
42 | + $sysList = SystemTypes::whereHas('SystemCategories', function($q) use($cat) { |
|
44 | 43 | $q->where('name', $cat); |
45 | 44 | })->get(); |
46 | 45 |