@@ -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 | |
@@ -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 | } |
@@ -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 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | use Illuminate\Support\Facades\Route; |
| 16 | 16 | |
| 17 | 17 | class CustomerSystemsController extends Controller |
| 18 | -{ |
|
| 18 | +{ |
|
| 19 | 19 | use SystemsTrait; |
| 20 | 20 | |
| 21 | 21 | public function __construct() |
@@ -79,8 +79,7 @@ discard block |
||
| 79 | 79 | // Add the 'documentation' column in the tech_tips table |
| 80 | 80 | if(!Schema::hasColumn('tech_tips', 'documentation')) |
| 81 | 81 | { |
| 82 | - Schema::table('tech_tips', function(Blueprint $table) |
|
| 83 | - { |
|
| 82 | + Schema::table('tech_tips', function(Blueprint $table) { |
|
| 84 | 83 | $table->boolean('documentation')->default(0)->nullable()->after('public'); |
| 85 | 84 | }); |
| 86 | 85 | |
@@ -113,8 +112,7 @@ discard block |
||
| 113 | 112 | // Add the 'is_installer' column in the users table |
| 114 | 113 | if(!Schema::hasColumn('users', 'is_installer')) |
| 115 | 114 | { |
| 116 | - Schema::table('users', function(Blueprint $table) |
|
| 117 | - { |
|
| 115 | + Schema::table('users', function(Blueprint $table) { |
|
| 118 | 116 | $table->boolean('is_installer')->default(0)->after('active'); |
| 119 | 117 | }); |
| 120 | 118 | |
@@ -198,8 +196,7 @@ discard block |
||
| 198 | 196 | ]); |
| 199 | 197 | } |
| 200 | 198 | } |
| 201 | - Schema::table('user_role', function(Blueprint $table) |
|
| 202 | - { |
|
| 199 | + Schema::table('user_role', function(Blueprint $table) { |
|
| 203 | 200 | $table->dropForeign(['user_id']); |
| 204 | 201 | $table->dropForeign(['role_id']); |
| 205 | 202 | }); |
@@ -211,8 +208,7 @@ discard block |
||
| 211 | 208 | // Remove the system_files and system_file_types table |
| 212 | 209 | if(Schema::hasTable('system_files')) |
| 213 | 210 | { |
| 214 | - Schema::table('system_files', function(Blueprint $table) |
|
| 215 | - { |
|
| 211 | + Schema::table('system_files', function(Blueprint $table) { |
|
| 216 | 212 | $table->dropForeign(['sys_id']); |
| 217 | 213 | $table->dropForeign(['type_id']); |
| 218 | 214 | $table->dropForeign(['file_id']); |
@@ -230,7 +226,7 @@ discard block |
||
| 230 | 226 | * @return void |
| 231 | 227 | */ |
| 232 | 228 | public function down() |
| 233 | - { |
|
| 229 | + { |
|
| 234 | 230 | if(Schema::hasColumn('file_links', 'cust_id')) |
| 235 | 231 | { |
| 236 | 232 | Schema::table('file_links', function(Blueprint $table) { |
@@ -248,8 +244,7 @@ discard block |
||
| 248 | 244 | |
| 249 | 245 | if(Schema::hasColumn('tech_tips', 'documentation')) |
| 250 | 246 | { |
| 251 | - Schema::table('tech_tips', function(Blueprint $table) |
|
| 252 | - { |
|
| 247 | + Schema::table('tech_tips', function(Blueprint $table) { |
|
| 253 | 248 | $table->dropColumn('documentation'); |
| 254 | 249 | }); |
| 255 | 250 | } |
@@ -42,7 +42,8 @@ discard block |
||
| 42 | 42 | $this->line(''); |
| 43 | 43 | |
| 44 | 44 | // Determine if the daily or single log channel is being used |
| 45 | - switch ($channel) { |
|
| 45 | + switch ($channel) |
|
| 46 | + { |
|
| 46 | 47 | case 'daily': |
| 47 | 48 | $this->dailyLog(); |
| 48 | 49 | break; |
@@ -84,10 +85,13 @@ discard block |
||
| 84 | 85 | private function cleanLogFile($logFile) |
| 85 | 86 | { |
| 86 | 87 | // Verify the file exists before trying to clear it |
| 87 | - if (file_exists($logFile)) { |
|
| 88 | + if (file_exists($logFile)) |
|
| 89 | + { |
|
| 88 | 90 | file_put_contents($logFile, ''); |
| 89 | 91 | $this->line('Log File Emptied'); |
| 90 | - } else { |
|
| 92 | + } |
|
| 93 | + else |
|
| 94 | + { |
|
| 91 | 95 | $this->line('Well, this is embarrassing...'); |
| 92 | 96 | $this->line('It seems I cannot find your log file'); |
| 93 | 97 | $this->line(''); |