@@ -25,14 +25,14 @@ |
||
| 25 | 25 | public function boot() |
| 26 | 26 | { |
| 27 | 27 | // Service provider to customize form inputs |
| 28 | - Form::component('bsText', 'components.form.text', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 28 | + Form::component('bsText', 'components.form.text', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 29 | 29 | Form::component('bsPassword', 'components.form.password', ['name', 'label', 'value' => null, 'attributes' => []]); |
| 30 | - Form::component('bsNumber', 'components.form.number', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 31 | - Form::component('bsEmail', 'components.form.email', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 32 | - Form::component('bsDate', 'components.form.date', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 30 | + Form::component('bsNumber', 'components.form.number', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 31 | + Form::component('bsEmail', 'components.form.email', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 32 | + Form::component('bsDate', 'components.form.date', ['name', 'label', 'value' => null, 'attributes' => []]); |
|
| 33 | 33 | Form::component('bsTextarea', 'components.form.textarea', ['name', 'label', 'value' => null, 'attributes' => []]); |
| 34 | 34 | Form::component('bsCheckbox', 'components.form.checkbox', ['name', 'label', 'value' => 'on', 'checked' => false, 'attributes' => []]); |
| 35 | - Form::component('bsSelect', 'components.form.select', ['name', 'label', 'list', 'selected' => null, 'attributes' => []]); |
|
| 35 | + Form::component('bsSelect', 'components.form.select', ['name', 'label', 'list', 'selected' => null, 'attributes' => []]); |
|
| 36 | 36 | // Custom Submit button |
| 37 | 37 | Form::component('bsSubmit', 'components.form.submit', ['name']); |
| 38 | 38 | // List of all states in a dropdown box |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | // Get the possible system types that can be assigned to the customer |
| 25 | 25 | public function index() |
| 26 | 26 | { |
| 27 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 27 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 28 | 28 | $sysList = new CategoriesCollection(SystemCategories::with('SystemTypes')->with('SystemTypes.SystemDataFields.SystemDataFieldTypes')->get()); |
| 29 | 29 | |
| 30 | 30 | return $sysList; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | // Store a new system for the customer |
| 34 | 34 | public function store(Request $request) |
| 35 | 35 | { |
| 36 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 36 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 37 | 37 | |
| 38 | 38 | $request->validate([ |
| 39 | 39 | 'cust_id' => 'required', |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | // Get the list of systems attached to the customer |
| 77 | 77 | public function show($id) |
| 78 | 78 | { |
| 79 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 79 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 80 | 80 | |
| 81 | 81 | $sysList = CustomerSystems::where('cust_id', $id) |
| 82 | 82 | ->with('SystemTypes') |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | // Update the customers system data |
| 106 | 106 | public function update(Request $request, $id) |
| 107 | 107 | { |
| 108 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 108 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 109 | 109 | |
| 110 | 110 | $request->validate([ |
| 111 | 111 | 'cust_id' => 'required', |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | foreach($fields as $data) |
| 126 | 126 | { |
| 127 | - $fieldName = 'field_' . $data->field_id; |
|
| 127 | + $fieldName = 'field_'.$data->field_id; |
|
| 128 | 128 | if(isset($request->$fieldName)) |
| 129 | 129 | { |
| 130 | 130 | Log::debug($request->$fieldName); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | // Delete a system attached to a customer |
| 143 | 143 | public function destroy($id) |
| 144 | 144 | { |
| 145 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 145 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 146 | 146 | |
| 147 | 147 | // return response('deleted '.$id); |
| 148 | 148 | $system = CustomerSystems::find($id); |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | // Determine if a user can see the Administration Nav Link |
| 38 | 38 | public function seeAdminLink(User $user) |
| 39 | 39 | { |
| 40 | - if ($this->isInstaller($user)) |
|
| 40 | + if($this->isInstaller($user)) |
|
| 41 | 41 | { |
| 42 | 42 | return true; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $data = UserRolePermissions::with('UserRolePermissionTypes') |
| 46 | - ->whereHas('UserRolePermissionTypes', function ($query) { |
|
| 46 | + ->whereHas('UserRolePermissionTypes', function($query) { |
|
| 47 | 47 | $query->where('description', 'Manage Users') |
| 48 | 48 | ->orWhere('description', 'Manage User Roles') |
| 49 | 49 | ->orWhere('description', 'Manage Customers') |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ->get(); |
| 55 | 55 | |
| 56 | 56 | $allow = $data->isEmpty() ? 'Denied' : 'Allowed'; |
| 57 | - Log::debug('User ' . $user->full_name . ' is trying to see admin link. Result - ' . $allow); |
|
| 57 | + Log::debug('User '.$user->full_name.' is trying to see admin link. Result - '.$allow); |
|
| 58 | 58 | |
| 59 | 59 | return $data->isEmpty() ? false : true; |
| 60 | 60 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $data = UserRolePermissions::with('UserRolePermissionTypes') |
| 72 | - ->whereHas('UserRolePermissionTypes', function ($query) use ($task) { |
|
| 72 | + ->whereHas('UserRolePermissionTypes', function($query) use ($task) { |
|
| 73 | 73 | $query->where('description', $task); |
| 74 | 74 | }) |
| 75 | 75 | ->where('role_id', $user->role_id) |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | ->get(); |
| 78 | 78 | |
| 79 | 79 | $allow = $data->isEmpty() ? 'false' : 'true'; |
| 80 | - Log::debug('User '.$user->full_name.' is trying to access '.$task.'. Result - ' . $allow); |
|
| 81 | - if ($allow === 'Denied') |
|
| 80 | + Log::debug('User '.$user->full_name.' is trying to access '.$task.'. Result - '.$allow); |
|
| 81 | + if($allow === 'Denied') |
|
| 82 | 82 | { |
| 83 | - Log::alert('User ' . $user->full_name . ' was denied from accessing '.$task.' link.'); |
|
| 83 | + Log::alert('User '.$user->full_name.' was denied from accessing '.$task.' link.'); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | return $data->isEmpty() ? false : true; |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | |
| 131 | 131 | // Update the primary contact information |
| 132 | 132 | $details = Customers::find($request->cust_id); |
| 133 | - if ($details->parent_id && $request->shared == 'true') |
|
| 133 | + if($details->parent_id && $request->shared == 'true') |
|
| 134 | 134 | { |
| 135 | 135 | $request->cust_id = $details->parent_id; |
| 136 | 136 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // Determine if the note should go to the customer, or its parent |
| 33 | 33 | $details = Customers::find($request->cust_id); |
| 34 | - if ($details->parent_id && $request->shared == 'true') |
|
| 34 | + if($details->parent_id && $request->shared == 'true') |
|
| 35 | 35 | { |
| 36 | 36 | $request->cust_id = $details->parent_id; |
| 37 | 37 | } |
@@ -56,21 +56,21 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | // Determine if there is a parent site with shared notes |
| 58 | 58 | $parent = Customers::find($id)->parent_id; |
| 59 | - if ($parent) |
|
| 59 | + if($parent) |
|
| 60 | 60 | { |
| 61 | 61 | $parentList = CustomerNotes::where('cust_id', $parent)->where('shared', 1)->orderBy('urgent', 'desc')->get(); |
| 62 | 62 | |
| 63 | 63 | $notes = $notes->merge($parentList); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 66 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 67 | 67 | return $notes; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Update a customer note |
| 71 | 71 | public function update(Request $request, $id) |
| 72 | 72 | { |
| 73 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 73 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 74 | 74 | |
| 75 | 75 | $request->validate([ |
| 76 | 76 | 'cust_id' => 'required', |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ]); |
| 80 | 80 | |
| 81 | 81 | $details = Customers::find($request->cust_id); |
| 82 | - if ($details->parent_id && $request->shared == 'true') |
|
| 82 | + if($details->parent_id && $request->shared == 'true') |
|
| 83 | 83 | { |
| 84 | 84 | $request->cust_id = $details->parent_id; |
| 85 | 85 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ]); |
| 81 | 81 | |
| 82 | 82 | // Update the site timezone |
| 83 | - if (config('app.timezone') !== $request->timezone) |
|
| 83 | + if(config('app.timezone') !== $request->timezone) |
|
| 84 | 84 | { |
| 85 | 85 | Settings::firstOrCreate( |
| 86 | 86 | ['key' => 'app.timezone'], |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | )->update(['value' => $request->timezone]); |
| 89 | 89 | } |
| 90 | 90 | // Update the maximum file upload size |
| 91 | - if (config('filesystems.paths.max_size') !== $request->filesize) |
|
| 91 | + if(config('filesystems.paths.max_size') !== $request->filesize) |
|
| 92 | 92 | { |
| 93 | 93 | Settings::firstOrCreate( |
| 94 | 94 | ['key' => 'filesystems.paths.max_size'], |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | Log::debug('Preparing to clean a file. Current Name - '.$fileName.'. Current Path - '.$path); |
| 20 | 20 | // Remove all spaces |
| 21 | 21 | $fileName = str_replace(' ', '_', $fileName); |
| 22 | - Log::debug('Cleaned Filename. Current Name - ' . $fileName . '. Current Path - ' . $path); |
|
| 22 | + Log::debug('Cleaned Filename. Current Name - '.$fileName.'. Current Path - '.$path); |
|
| 23 | 23 | |
| 24 | 24 | // Determine if the filename already exists |
| 25 | 25 | if(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)) |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | // Increase the number until one that is not in use is found |
| 45 | 45 | do |
| 46 | 46 | { |
| 47 | - Log::debug('Filename ' . $fileName . ' already exists. Appending name.'); |
|
| 47 | + Log::debug('Filename '.$fileName.' already exists. Appending name.'); |
|
| 48 | 48 | $fileName = $base.'('.++$number.')'.$extension; |
| 49 | 49 | } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)); |
| 50 | 50 | } |
@@ -22,16 +22,16 @@ discard block |
||
| 22 | 22 | // Dashboard is the Logged In User home landing page |
| 23 | 23 | public function index() |
| 24 | 24 | { |
| 25 | - Log::debug('Route "' . Route::currentRouteName() . '" visited by ' . Auth::user()->full_name); |
|
| 25 | + Log::debug('Route "'.Route::currentRouteName().'" visited by '.Auth::user()->full_name); |
|
| 26 | 26 | |
| 27 | 27 | // Get Dashboard data |
| 28 | - $custFavs = CustomerFavs::where('user_id', Auth::user()->user_id) |
|
| 29 | - ->with(array('Customers' => function($query){ |
|
| 28 | + $custFavs = CustomerFavs::where('user_id', Auth::user()->user_id) |
|
| 29 | + ->with(array('Customers' => function($query) { |
|
| 30 | 30 | $query->select('cust_id', 'name'); |
| 31 | 31 | })) |
| 32 | 32 | ->get(); |
| 33 | - $tipFavs = TechTipFavs::where('user_id', Auth::user()->user_id) |
|
| 34 | - ->with(array('TechTips' => function($query){ |
|
| 33 | + $tipFavs = TechTipFavs::where('user_id', Auth::user()->user_id) |
|
| 34 | + ->with(array('TechTips' => function($query) { |
|
| 35 | 35 | $query->select('tip_id', 'subject'); |
| 36 | 36 | })) |
| 37 | 37 | ->get(); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // Mark a notification as read |
| 68 | 68 | public function markNotification($id) |
| 69 | 69 | { |
| 70 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 70 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 71 | 71 | |
| 72 | 72 | $notification = Auth::user()->notifications()->where('id', $id)->where('notifiable_id', Auth::user()->user_id)->first(); |
| 73 | 73 | if(!$notification) |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | // Delte a user notification |
| 86 | 86 | public function delNotification($id) |
| 87 | 87 | { |
| 88 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 88 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 89 | 89 | |
| 90 | 90 | $notification = Auth::user()->notifications()->where('id', $id)->where('notifiable_id', Auth::user()->user_id)->first(); |
| 91 | 91 | if(!$notification) |
| 92 | 92 | { |
| 93 | - Log::error('User ' . Auth::user()->full_name . ' tried to delete an invalid notification. Notification ID: ' . $id); |
|
| 93 | + Log::error('User '.Auth::user()->full_name.' tried to delete an invalid notification. Notification ID: '.$id); |
|
| 94 | 94 | return abort(404); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | // Retrieve the instructions attached to a link |
| 260 | 260 | public function getInstructions($linkID) |
| 261 | 261 | { |
| 262 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
| 262 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
| 263 | 263 | |
| 264 | 264 | $linkData = FileLinks::select('note')->where('link_id', $linkID)->first(); |
| 265 | 265 | Log::debug('Link Instructions Gathered - ', array($linkData)); |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | // Update the instructions attached to the link |
| 271 | 271 | public function submitInstructions(Request $request, $linkID) |
| 272 | 272 | { |
| 273 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name . '. Submitted Data - ', $request->toArray()); |
|
| 273 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
| 274 | 274 | |
| 275 | 275 | FileLinks::find($linkID)->update([ |
| 276 | 276 | 'note' => $request->instructions, |