@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('file_links', function(Blueprint $table) |
|
17 | - { |
|
16 | + Schema::table('file_links', function(Blueprint $table) { |
|
18 | 17 | $table->integer('cust_id') |
19 | 18 | ->unsigned() |
20 | 19 | ->nullable() |
@@ -33,8 +32,7 @@ discard block |
||
33 | 32 | */ |
34 | 33 | public function down() |
35 | 34 | { |
36 | - Schema::table('file_links', function(Blueprint $table) |
|
37 | - { |
|
35 | + Schema::table('file_links', function(Blueprint $table) { |
|
38 | 36 | $table->dropForeign(['cust_id']); |
39 | 37 | $table->dropColumn('cust_id'); |
40 | 38 | $table->dropColumn('note'); |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function up() |
17 | 17 | { |
18 | - Schema::table('users', function(Blueprint $table) |
|
19 | - { |
|
18 | + Schema::table('users', function(Blueprint $table) { |
|
20 | 19 | $table->timestamp('password_expires') |
21 | 20 | ->nullable() |
22 | 21 | ->after('active'); |
@@ -41,8 +40,7 @@ discard block |
||
41 | 40 | */ |
42 | 41 | public function down() |
43 | 42 | { |
44 | - Schema::table('users', function(Blueprint $table) |
|
45 | - { |
|
43 | + Schema::table('users', function(Blueprint $table) { |
|
46 | 44 | $table->dropColumn('password_expires'); |
47 | 45 | }); |
48 | 46 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | -$factory->define(App\User::class, function (Faker $faker) { |
|
16 | +$factory->define(App\User::class, function(Faker $faker) { |
|
17 | 17 | return [ |
18 | 18 | // 'user_id' => rand(5, 20), |
19 | 19 | 'username' => $faker->unique()->lastName, |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | |
5 | -$factory->define(App\FileLinks::class, function (Faker $faker) { |
|
5 | +$factory->define(App\FileLinks::class, function(Faker $faker) { |
|
6 | 6 | return [ |
7 | 7 | 'user_id' => 1, |
8 | 8 | 'cust_id' => null, |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | // Upload new file |
62 | 62 | public function update(Request $request, $id) |
63 | - { |
|
63 | + { |
|
64 | 64 | $request->validate(['name' => 'required', 'file' => 'required']); |
65 | 65 | |
66 | 66 | $details = FileLinks::where('link_hash', $id)->first(); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | $hash = strtolower(str_random(15)); |
64 | 64 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
65 | - }while($dup != 0); |
|
65 | + } while($dup != 0); |
|
66 | 66 | |
67 | 67 | // If the "customer id" field is populated, separate the ID from the name and prepare for insertion. |
68 | 68 | if($request->customer_tag != null) |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | |
138 | 138 | $nextChange = config('users.passExpires') != null ? Carbon::now()->addDays(config('users.passExpires')) : null; |
139 | 139 | |
140 | - // Update the password |
|
140 | + // Update the password |
|
141 | 141 | User::find($userData->user_id)->update( |
142 | 142 | [ |
143 | 143 | 'password' => bcrypt($request->newPass), |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | |
270 | 270 | $nextChange = isset($request->force_change) && $request->force_change == 'on' ? Carbon::now()->subDay() : null; |
271 | 271 | |
272 | - // Update the user data |
|
272 | + // Update the user data |
|
273 | 273 | User::find($id)->update( |
274 | 274 | [ |
275 | 275 | 'password' => bcrypt($request->password), |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $roleArr = []; |
40 | 40 | foreach($roles as $role) |
41 | 41 | { |
42 | - if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer'])) |
|
42 | + if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer'])) |
|
43 | 43 | { |
44 | 44 | |
45 | 45 | continue; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | // Submit the initialize user form |
116 | 116 | public function submitInitializeUser(Request $request, $hash) |
117 | - { |
|
117 | + { |
|
118 | 118 | // Verify that the link matches the assigned email address |
119 | 119 | $valid = UserInitialize::where('token', $hash)->first(); |
120 | 120 | if(empty($valid)) |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $roleArr = []; |
192 | 192 | foreach($roles as $role) |
193 | 193 | { |
194 | - if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer'])) |
|
194 | + if($role->role_id == 1 && !Auth::user()->hasAnyRole(['installer'])) |
|
195 | 195 | { |
196 | 196 | continue; |
197 | 197 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function handle($request, Closure $next, $guard = null) |
19 | 19 | { |
20 | - if (Auth::guard($guard)->check()) { |
|
20 | + if(Auth::guard($guard)->check()) { |
|
21 | 21 | return redirect('/dashboard'); |
22 | 22 | } |
23 | 23 |
@@ -17,7 +17,8 @@ |
||
17 | 17 | */ |
18 | 18 | public function handle($request, Closure $next, $guard = null) |
19 | 19 | { |
20 | - if (Auth::guard($guard)->check()) { |
|
20 | + if (Auth::guard($guard)->check()) |
|
21 | + { |
|
21 | 22 | return redirect('/dashboard'); |
22 | 23 | } |
23 | 24 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | { |
21 | 21 | $user = $request->user(); |
22 | 22 | |
23 | - if($user->password_expires != NULL) |
|
23 | + if($user->password_expires != null) |
|
24 | 24 | { |
25 | 25 | $passExp = new Carbon(($user->password_expires)); |
26 | 26 |