@@ -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 |
@@ -88,7 +88,8 @@ |
||
| 88 | 88 | $this->line(''); |
| 89 | 89 | |
| 90 | 90 | $anticipate = []; |
| 91 | - foreach($updateList as $key => $up) { |
|
| 91 | + foreach($updateList as $key => $up) |
|
| 92 | + { |
|
| 92 | 93 | $opt = $key; |
| 93 | 94 | $anticipate[$opt] = $up; |
| 94 | 95 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $this->fix = true; |
| 33 | 33 | } |
| 34 | 34 | // Extend the amount of time the script is allowed to run |
| 35 | - ini_set('max_execution_time', 600); // 600 seconds = 10 minutes |
|
| 35 | + ini_set('max_execution_time', 600); // 600 seconds = 10 minutes |
|
| 36 | 36 | |
| 37 | 37 | // Begin check |
| 38 | 38 | $fixStr = $this->fix ? 'on' : 'off'; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | Log::notice('Current Active Installers - ', $instArr); |
| 81 | 81 | |
| 82 | 82 | // All Active Administrators |
| 83 | - $adminArr = []; |
|
| 83 | + $adminArr = []; |
|
| 84 | 84 | $administrators = User::where('role_id', 2)->get(); |
| 85 | 85 | foreach($administrators as $adm) |
| 86 | 86 | { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // Validate that each user has a user_settings entry |
| 99 | 99 | $this->line(''); |
| 100 | 100 | $this->line('Validating User Settings'); |
| 101 | - $userList = User::all(); |
|
| 101 | + $userList = User::all(); |
|
| 102 | 102 | foreach($userList as $user) |
| 103 | 103 | { |
| 104 | 104 | $row = UserSettings::where('user_id', $user->user_id)->count(); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | // Get the total count of file links the user has |
| 50 | 50 | public function getUserTotalLinks() |
| 51 | 51 | { |
| 52 | - $totalLinks = FileLinks::where('user_id', $this->userID)->count(); |
|
| 52 | + $totalLinks = FileLinks::where('user_id', $this->userID)->count(); |
|
| 53 | 53 | Log::debug('Retrieved count of total File Links for User ID'.$this->userID.'. Data - ', ['Total Links' => $totalLinks]); |
| 54 | 54 | |
| 55 | 55 | return $totalLinks; |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | // Find any fields that have been removed from the list |
| 76 | 76 | protected function findRemovedFields() |
| 77 | 77 | { |
| 78 | - $curFields = $this->getFieldsForEquip($this->sysID); //SystemDataFields::where('sys_id', $this->sysID)->get(); |
|
| 78 | + $curFields = $this->getFieldsForEquip($this->sysID); //SystemDataFields::where('sys_id', $this->sysID)->get(); |
|
| 79 | 79 | |
| 80 | 80 | $removedList = []; |
| 81 | 81 | foreach($curFields as $field) |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $parts = pathinfo($name); |
| 41 | 41 | $ext = isset($parts['extension']) ? ('.'.$parts['extension']) : ''; |
| 42 | 42 | $base = $parts['filename']; |
| 43 | - $number = 0; |
|
| 43 | + $number = 0; |
|
| 44 | 44 | |
| 45 | 45 | do |
| 46 | 46 | { |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $mail->to($emailAddress)->send(new TestEmail); |
| 56 | 56 | } |
| 57 | - catch (\Exception $e) |
|
| 57 | + catch(\Exception $e) |
|
| 58 | 58 | { |
| 59 | 59 | return $e->getMessage(); |
| 60 | 60 | } |
@@ -85,13 +85,13 @@ |
||
| 85 | 85 | ->when(isset($searchData->name), function($q) use ($searchData) |
| 86 | 86 | { |
| 87 | 87 | $q->where('name', 'like', '%'.$searchData->name.'%') |
| 88 | - ->orWhere('cust_id', 'like', '%'.$searchData->name.'%') |
|
| 89 | - ->orWhere('dba_name', 'like', '%'.$searchData->name.'%'); |
|
| 88 | + ->orWhere('cust_id', 'like', '%'.$searchData->name.'%') |
|
| 89 | + ->orWhere('dba_name', 'like', '%'.$searchData->name.'%'); |
|
| 90 | 90 | }) |
| 91 | 91 | ->when($includeSystems, function($q) |
| 92 | 92 | { |
| 93 | 93 | $q->with('CustomerSystems.SystemTypes') |
| 94 | - ->with('ParentSystems.SystemTypes'); |
|
| 94 | + ->with('ParentSystems.SystemTypes'); |
|
| 95 | 95 | }) |
| 96 | 96 | ->paginate($pagination->perPage); |
| 97 | 97 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $pagination = $this->getPagination($request); |
| 17 | 17 | $sort = $this->getSortFields($request); |
| 18 | 18 | |
| 19 | - if((array)$searchData) |
|
| 19 | + if((array) $searchData) |
|
| 20 | 20 | { |
| 21 | 21 | $results = $this->searchFor($searchData, $pagination, $sort, true); |
| 22 | 22 | } |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | // Search equipment field |
| 68 | 68 | ->when(isset($searchData->equipment), function($q) use ($searchData) |
| 69 | 69 | { |
| 70 | - $q->whereHas('ParentSystems.SystemTypes', function ($qry) use ($searchData) |
|
| 70 | + $q->whereHas('ParentSystems.SystemTypes', function($qry) use ($searchData) |
|
| 71 | 71 | { |
| 72 | 72 | $qry->where('sys_id', $searchData->equipment); |
| 73 | 73 | }) |
| 74 | - ->orWhereHas('CustomerSystems.SystemTypes', function ($qry) use ($searchData) |
|
| 74 | + ->orWhereHas('CustomerSystems.SystemTypes', function($qry) use ($searchData) |
|
| 75 | 75 | { |
| 76 | 76 | $qry->where('sys_id', $searchData->equipment); |
| 77 | 77 | }); |
@@ -65,31 +65,25 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | return Customers::orderBy($sort->sortField, $sort->sortType) |
| 67 | 67 | // Search equipment field |
| 68 | - ->when(isset($searchData->equipment), function($q) use ($searchData) |
|
| 69 | - { |
|
| 70 | - $q->whereHas('ParentSystems.SystemTypes', function ($qry) use ($searchData) |
|
| 71 | - { |
|
| 68 | + ->when(isset($searchData->equipment), function($q) use ($searchData) { |
|
| 69 | + $q->whereHas('ParentSystems.SystemTypes', function ($qry) use ($searchData) { |
|
| 72 | 70 | $qry->where('sys_id', $searchData->equipment); |
| 73 | 71 | }) |
| 74 | - ->orWhereHas('CustomerSystems.SystemTypes', function ($qry) use ($searchData) |
|
| 75 | - { |
|
| 72 | + ->orWhereHas('CustomerSystems.SystemTypes', function ($qry) use ($searchData) { |
|
| 76 | 73 | $qry->where('sys_id', $searchData->equipment); |
| 77 | 74 | }); |
| 78 | 75 | }) |
| 79 | 76 | // Search city field |
| 80 | - ->when(isset($searchData->city), function($q) use ($searchData) |
|
| 81 | - { |
|
| 77 | + ->when(isset($searchData->city), function($q) use ($searchData) { |
|
| 82 | 78 | $q->where('city', 'like', '%'.$searchData->city.'%'); |
| 83 | 79 | }) |
| 84 | 80 | // Search name field |
| 85 | - ->when(isset($searchData->name), function($q) use ($searchData) |
|
| 86 | - { |
|
| 81 | + ->when(isset($searchData->name), function($q) use ($searchData) { |
|
| 87 | 82 | $q->where('name', 'like', '%'.$searchData->name.'%') |
| 88 | 83 | ->orWhere('cust_id', 'like', '%'.$searchData->name.'%') |
| 89 | 84 | ->orWhere('dba_name', 'like', '%'.$searchData->name.'%'); |
| 90 | 85 | }) |
| 91 | - ->when($includeSystems, function($q) |
|
| 92 | - { |
|
| 86 | + ->when($includeSystems, function($q) { |
|
| 93 | 87 | $q->with('CustomerSystems.SystemTypes') |
| 94 | 88 | ->with('ParentSystems.SystemTypes'); |
| 95 | 89 | }) |
@@ -100,8 +94,7 @@ discard block |
||
| 100 | 94 | protected function getAllCustomers($pagination, $sort, $includeSystems = false) |
| 101 | 95 | { |
| 102 | 96 | return Customers::orderBy($sort->sortField, $sort->sortType) |
| 103 | - ->when($includeSystems, function($q) |
|
| 104 | - { |
|
| 97 | + ->when($includeSystems, function($q) { |
|
| 105 | 98 | $q->with('CustomerSystems.SystemTypes') |
| 106 | 99 | ->with('ParentSystems.SystemTypes'); |
| 107 | 100 | }) |
@@ -26,8 +26,7 @@ |
||
| 26 | 26 | protected function getEquipment($custID, $shared = false) |
| 27 | 27 | { |
| 28 | 28 | return CustomerSystems::where('cust_id', $custID) |
| 29 | - ->when($shared, function($q) |
|
| 30 | - { |
|
| 29 | + ->when($shared, function($q) { |
|
| 31 | 30 | $q->where('shared', 1); |
| 32 | 31 | }) |
| 33 | 32 | ->with('CustomerSystemData') |