@@ -11,6 +11,6 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Broadcast::channel('App.User.{id}', function ($user, $id) { |
|
| 14 | +Broadcast::channel('App.User.{id}', function($user, $id) { |
|
| 15 | 15 | return (int) $user->id === (int) $id; |
| 16 | 16 | }); |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | |
| 124 | 124 | |
| 125 | 125 | |
| 126 | - ///////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 126 | + ///////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 127 | 127 | |
| 128 | 128 | |
| 129 | 129 | |
@@ -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'); |
@@ -128,8 +125,7 @@ discard block |
||
| 128 | 125 | * Customer Routes |
| 129 | 126 | * |
| 130 | 127 | */ |
| 131 | - Route::prefix('customer')->name('customer.')->group(function() |
|
| 132 | - { |
|
| 128 | + Route::prefix('customer')->name('customer.')->group(function() { |
|
| 133 | 129 | |
| 134 | 130 | Route::get('search-id/{id}', 'CustomerController@searchID')->name('searchID'); |
| 135 | 131 | Route::get('file-types', 'CustomerFilesController@getFileTypes')->name('getFileTypes'); |
@@ -151,12 +147,10 @@ discard block |
||
| 151 | 147 | * Administration Routes |
| 152 | 148 | * |
| 153 | 149 | */ |
| 154 | - Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() |
|
| 155 | - { |
|
| 150 | + Route::group(['middleware' => 'roles', 'roles' => ['installer', 'admin']], function() { |
|
| 156 | 151 | |
| 157 | 152 | |
| 158 | - Route::prefix('admin')->name('admin.')->group(function() |
|
| 159 | - { |
|
| 153 | + Route::prefix('admin')->name('admin.')->group(function() { |
|
| 160 | 154 | // Admin User File Links routes |
| 161 | 155 | Route::get('links/show/{id}', 'Admin\AdminController@showLinks')->name('userLinks'); |
| 162 | 156 | Route::get('count-links', 'Admin\AdminController@countLinks')->name('countLinks'); |
@@ -186,10 +180,8 @@ discard block |
||
| 186 | 180 | * Installer Routes |
| 187 | 181 | * |
| 188 | 182 | */ |
| 189 | - Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() |
|
| 190 | - { |
|
| 191 | - Route::prefix('installer')->name('installer.')->group(function() |
|
| 192 | - { |
|
| 183 | + Route::group(['middleware' => 'roles', 'roles' => ['installer']], function() { |
|
| 184 | + Route::prefix('installer')->name('installer.')->group(function() { |
|
| 193 | 185 | // User Settings |
| 194 | 186 | Route::get('user-security-settings', 'Installer\SettingsController@userSecurity')->name('userSecurity'); |
| 195 | 187 | Route::post('user-security-settings', 'Installer\SettingsController@submitUserSecurity')->name('userSecurity'); |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | |
| 5 | -$factory->define(App\Customers::class, function (Faker $faker) { |
|
| 5 | +$factory->define(App\Customers::class, function(Faker $faker) { |
|
| 6 | 6 | return [ |
| 7 | 7 | // |
| 8 | 8 | 'cust_id' => rand(50, 5000), |
@@ -25,12 +25,12 @@ |
||
| 25 | 25 | ], |
| 26 | 26 | 'paths' => [ |
| 27 | 27 | 'default' => env('DFLT_FOLDER', DIRECTORY_SEPARATOR.'default'), |
| 28 | - 'systems' => env('SYS_FOLDER', DIRECTORY_SEPARATOR.'systems'), |
|
| 28 | + 'systems' => env('SYS_FOLDER', DIRECTORY_SEPARATOR.'systems'), |
|
| 29 | 29 | 'customers' => env('CUST_FOLDER', DIRECTORY_SEPARATOR.'customers'), |
| 30 | 30 | 'users' => env('USER_FOLDER', DIRECTORY_SEPARATOR.'users'), |
| 31 | - 'tips' => env('TIP_FOLDER', DIRECTORY_SEPARATOR.'tips'), |
|
| 31 | + 'tips' => env('TIP_FOLDER', DIRECTORY_SEPARATOR.'tips'), |
|
| 32 | 32 | 'links' => env('LINK_FOLDER', DIRECTORY_SEPARATOR.'links'), |
| 33 | 33 | 'company' => env('COMP_FOLDER', DIRECTORY_SEPARATOR.'company'), |
| 34 | - 'max_size' => env('MAX_UPLOAD', ini_get('post_max_size')), |
|
| 34 | + 'max_size' => env('MAX_UPLOAD', ini_get('post_max_size')), |
|
| 35 | 35 | ], |
| 36 | 36 | ]; |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | use Illuminate\Support\Str; |
| 5 | 5 | |
| 6 | -$factory->define(App\User::class, function (Faker $faker) { |
|
| 6 | +$factory->define(App\User::class, function(Faker $faker) { |
|
| 7 | 7 | return [ |
| 8 | 8 | 'username' => $faker->unique()->lastName, |
| 9 | 9 | 'first_name' => $faker->firstName, |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Illuminate\Support\Str; |
| 4 | 4 | use Faker\Generator as Faker; |
| 5 | 5 | |
| 6 | -$factory->define(App\FileLinks::class, function (Faker $faker) { |
|
| 6 | +$factory->define(App\FileLinks::class, function(Faker $faker) { |
|
| 7 | 7 | return [ |
| 8 | 8 | 'user_id' => 1, |
| 9 | 9 | 'cust_id' => null, |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | { |
| 64 | 64 | $hash = strtolower(Str::random(15)); |
| 65 | 65 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
| 66 | - }while($dup != 0); |
|
| 66 | + } while($dup != 0); |
|
| 67 | 67 | |
| 68 | 68 | // If the "customer id" field is populated, separate the ID from the name and prepare for insertion. |
| 69 | 69 | if($request->customer_tag != null) |
@@ -51,10 +51,10 @@ |
||
| 51 | 51 | |
| 52 | 52 | UserSettings::where('user_id', $userID)->update( |
| 53 | 53 | [ |
| 54 | - 'em_tech_tip' => $request->em_tech_tip === 'on' ? true : false, |
|
| 55 | - 'em_file_link' => $request->em_file_link === 'on' ? true : false, |
|
| 54 | + 'em_tech_tip' => $request->em_tech_tip === 'on' ? true : false, |
|
| 55 | + 'em_file_link' => $request->em_file_link === 'on' ? true : false, |
|
| 56 | 56 | 'em_notification' => $request->em_notification === 'on' ? true : false, |
| 57 | - 'auto_del_link' => $request->auto_del_link === 'on' ? true : false, |
|
| 57 | + 'auto_del_link' => $request->auto_del_link === 'on' ? true : false, |
|
| 58 | 58 | ]); |
| 59 | 59 | |
| 60 | 60 | Log::info('User Info Updated', ['user_id' => Auth::user()->user_id]); |
@@ -16,21 +16,21 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function register() |
| 18 | 18 | { |
| 19 | - try |
|
| 20 | - { |
|
| 21 | - if(Schema::hasTable('settings')) |
|
| 22 | - { |
|
| 23 | - $settings = DB::table('settings')->get(); |
|
| 24 | - foreach($settings as $setting) |
|
| 25 | - { |
|
| 26 | - Config([$setting->key => $setting->value]); |
|
| 27 | - } |
|
| 28 | - } |
|
| 29 | - } |
|
| 30 | - catch(\Illuminate\Database\QueryException $e) |
|
| 31 | - { |
|
| 19 | + try |
|
| 20 | + { |
|
| 21 | + if(Schema::hasTable('settings')) |
|
| 22 | + { |
|
| 23 | + $settings = DB::table('settings')->get(); |
|
| 24 | + foreach($settings as $setting) |
|
| 25 | + { |
|
| 26 | + Config([$setting->key => $setting->value]); |
|
| 27 | + } |
|
| 28 | + } |
|
| 29 | + } |
|
| 30 | + catch(\Illuminate\Database\QueryException $e) |
|
| 31 | + { |
|
| 32 | 32 | // |
| 33 | - } |
|
| 33 | + } |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |