@@ -14,7 +14,8 @@ |
||
| 14 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |
| 15 | 15 | // built-in PHP web server. This provides a convenient way to test a Laravel |
| 16 | 16 | // application without having installed a "real" web server software here. |
| 17 | -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { |
|
| 17 | +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) |
|
| 18 | +{ |
|
| 18 | 19 | return false; |
| 19 | 20 | } |
| 20 | 21 | |
@@ -13,8 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::table('system_cust_data_types', function(Blueprint $table) |
|
| 17 | - { |
|
| 16 | + Schema::table('system_cust_data_types', function(Blueprint $table) { |
|
| 18 | 17 | $table->boolean('hidden') |
| 19 | 18 | ->default(0) |
| 20 | 19 | ->after('name'); |
@@ -28,8 +27,7 @@ discard block |
||
| 28 | 27 | */ |
| 29 | 28 | public function down() |
| 30 | 29 | { |
| 31 | - Schema::table('system_cust_data_types', function(Blueprint $table) |
|
| 32 | - { |
|
| 30 | + Schema::table('system_cust_data_types', function(Blueprint $table) { |
|
| 33 | 31 | $table->dropColumn('hidden'); |
| 34 | 32 | }); |
| 35 | 33 | } |
@@ -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 | |
@@ -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(); |
@@ -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,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 | |
@@ -14,7 +14,8 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (! $request->expectsJson()) |
|
| 18 | + { |
|
| 18 | 19 | return route('login'); |
| 19 | 20 | } |
| 20 | 21 | } |
@@ -38,20 +38,20 @@ |
||
| 38 | 38 | $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : ''; |
| 39 | 39 | |
| 40 | 40 | // check for matching file names |
| 41 | - if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
| 41 | + if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
| 42 | 42 | { |
| 43 | 43 | // Have a number; increment it |
| 44 | 44 | $base = $match[1]; |
| 45 | 45 | $number = intVal($match[2]); |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } |
|
| 47 | + else |
|
| 48 | 48 | { |
| 49 | 49 | // No number; add one |
| 50 | 50 | $base = $fileParts['filename']; |
| 51 | 51 | $number = 0; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - do |
|
| 54 | + do |
|
| 55 | 55 | { |
| 56 | 56 | $fileName = $base.'('.++$number.')'.$extension; |
| 57 | 57 | } while (Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)); |