@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | // Get the types of documents that can be filtered |
112 | 112 | // $fileTypes = SystemFileTypes::all(); |
113 | - $typesArr = ['Tech Tip', 'Documentation']; |
|
113 | + $typesArr = ['Tech Tip', 'Documentation']; |
|
114 | 114 | // foreach($fileTypes as $type) |
115 | 115 | // { |
116 | 116 | // $typesArr[] = $type->description; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | public function search(Request $request) |
276 | 276 | { |
277 | - Log::debug('request Data -> '. $request->getContent()); |
|
277 | + Log::debug('request Data -> '.$request->getContent()); |
|
278 | 278 | $tips = []; |
279 | 279 | |
280 | 280 | // Determine if the search form is empty or has data in it |
@@ -22,16 +22,16 @@ |
||
22 | 22 | |
23 | 23 | // Insert default settings |
24 | 24 | DB::table('settings')->insert([ |
25 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.logo', 'value' => config('app.logo')], |
|
26 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.timezone', 'value' => config('app.timezone')], |
|
27 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.host', 'value' => config('mail.host')], |
|
28 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.port', 'value' => config('mail.port')], |
|
29 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.encryption', 'value' => config('mail.encryption')], |
|
30 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.username', 'value' => config('mail.username')], |
|
31 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.password', 'value' => config('mail.password')], |
|
25 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.logo', 'value' => config('app.logo')], |
|
26 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'app.timezone', 'value' => config('app.timezone')], |
|
27 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.host', 'value' => config('mail.host')], |
|
28 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.port', 'value' => config('mail.port')], |
|
29 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.encryption', 'value' => config('mail.encryption')], |
|
30 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.username', 'value' => config('mail.username')], |
|
31 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.password', 'value' => config('mail.password')], |
|
32 | 32 | ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.from.address', 'value' => config('mail.from.address')], |
33 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.from.name', 'value' => config('mail.from.name')], |
|
34 | - ['created_at' => \Carbon\Carbon::now(), 'key' => 'user.passExpires', 'value' => 30], |
|
33 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'mail.from.name', 'value' => config('mail.from.name')], |
|
34 | + ['created_at' => \Carbon\Carbon::now(), 'key' => 'user.passExpires', 'value' => 30], |
|
35 | 35 | ]); |
36 | 36 | } |
37 | 37 |
@@ -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 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('user_permissions', function (Blueprint $table) { |
|
16 | + Schema::create('user_permissions', function(Blueprint $table) { |
|
17 | 17 | $table->increments('user_id')->unsigned(); |
18 | 18 | $table->boolean('manage_users')->default(0); |
19 | 19 | $table->boolean('run_reports')->default(0); |
@@ -68,16 +68,16 @@ |
||
68 | 68 | { |
69 | 69 | UserSettings::where('user_id', Auth::user()->user_id)->update( |
70 | 70 | [ |
71 | - 'em_tech_tip' => $request->em_tech_tip === 'on' ? true : false, |
|
72 | - 'em_file_link' => $request->em_file_link === 'on' ? true : false, |
|
71 | + 'em_tech_tip' => $request->em_tech_tip === 'on' ? true : false, |
|
72 | + 'em_file_link' => $request->em_file_link === 'on' ? true : false, |
|
73 | 73 | 'em_notification' => $request->em_notification === 'on' ? true : false, |
74 | - 'auto_del_link' => $request->auto_del_link === 'on' ? true : false, |
|
74 | + 'auto_del_link' => $request->auto_del_link === 'on' ? true : false, |
|
75 | 75 | ]); |
76 | 76 | |
77 | 77 | session()->flash('success', 'User Notifications Updated'); |
78 | 78 | |
79 | 79 | Log::notice('User Notifications Updated', ['user_id' => Auth::user()->user_id]); |
80 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
80 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
81 | 81 | Log::debug('Submitted Data - ', $request->toArray()); |
82 | 82 | return redirect(route('account')); |
83 | 83 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use App\UserPermissions; |
6 | 6 | use Faker\Generator as Faker; |
7 | 7 | |
8 | -$factory->define(App\UserPermissions::class, function (Faker $faker) { |
|
8 | +$factory->define(App\UserPermissions::class, function(Faker $faker) { |
|
9 | 9 | return [ |
10 | 10 | 'user_id' => 0, |
11 | 11 | 'manage_users' => 0, |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | // Verify the user is logged in and has permissions for this page |
30 | 30 | $this->middleware('auth'); |
31 | - $this->middleware(function ($request, $next) { |
|
31 | + $this->middleware(function($request, $next) { |
|
32 | 32 | $this->user = auth()->user(); |
33 | 33 | $this->authorize('hasAccess', 'use_file_links'); |
34 | 34 | return $next($request); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // Landing page shows all links that the user owns |
39 | 39 | public function index() |
40 | 40 | { |
41 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
41 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
42 | 42 | return view('links.index'); |
43 | 43 | } |
44 | 44 | |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | ]); |
334 | 334 | |
335 | 335 | Log::info('User ID '.Auth::user()->user_id.' disabled link ID - '.$id); |
336 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
336 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
337 | 337 | return response()->json(['success' => true]); |
338 | 338 | } |
339 | 339 |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $searchResults = new CustomerCollection( |
112 | 112 | Customers::where('cust_id', 'like', '%'.$request->search.'%') |
113 | 113 | ->orWhere('name', 'like', '%'.$request->search.'%') |
114 | - ->orWhere('dba_name', 'like', '%' . $request->search . '%') |
|
114 | + ->orWhere('dba_name', 'like', '%'.$request->search.'%') |
|
115 | 115 | ->get() |
116 | 116 | ); |
117 | 117 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | // Toggle whether or not the customer is listed as a user favorite |
144 | 144 | public function toggleFav($action, $id) |
145 | 145 | { |
146 | - switch ($action) |
|
146 | + switch($action) |
|
147 | 147 | { |
148 | 148 | case 'add': |
149 | 149 | CustomerFavs::create([ |
@@ -42,7 +42,7 @@ 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 | case 'daily': |
47 | 47 | $this->dailyLog(); |
48 | 48 | break; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $logPath = config('logging.channels.daily.path'); |
69 | 69 | $fileParts = pathinfo($logPath); |
70 | 70 | $timeStamp = Carbon::now()->format('Y-m-d'); |
71 | - $logFile = $fileParts['dirname'] . DIRECTORY_SEPARATOR . $fileParts['filename'] . '-' . $timeStamp . '.' . $fileParts['extension']; |
|
71 | + $logFile = $fileParts['dirname'].DIRECTORY_SEPARATOR.$fileParts['filename'].'-'.$timeStamp.'.'.$fileParts['extension']; |
|
72 | 72 | |
73 | 73 | return $logFile; |
74 | 74 | } |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | private function cleanLogFile($logFile) |
85 | 85 | { |
86 | 86 | // Verify the file exists before trying to clear it |
87 | - if (file_exists($logFile)) { |
|
87 | + if(file_exists($logFile)) { |
|
88 | 88 | file_put_contents($logFile, ''); |
89 | 89 | $this->line('Log File Emptied'); |
90 | 90 | } else { |
91 | 91 | $this->line('Well, this is embarrassing...'); |
92 | 92 | $this->line('It seems I cannot find your log file'); |
93 | 93 | $this->line(''); |
94 | - $this->line('I was looking for ' . $logFile); |
|
94 | + $this->line('I was looking for '.$logFile); |
|
95 | 95 | $this->line('It either has not been created yet, or there was a problem with my algorithm'); |
96 | 96 | } |
97 | 97 |
@@ -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(''); |