@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | $fileTypes = CustomerFileTypes::all(); |
25 | 25 | $fTypes = []; |
26 | - foreach($fileTypes as $type) |
|
26 | + foreach ($fileTypes as $type) |
|
27 | 27 | { |
28 | 28 | $fTypes[$type->file_type_id] = $type->description; |
29 | 29 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $custFile = CustomerFiles::find($id); |
94 | 94 | $fileTypes = CustomerFileTypes::all(); |
95 | 95 | $fTypes = []; |
96 | - foreach($fileTypes as $type) |
|
96 | + foreach ($fileTypes as $type) |
|
97 | 97 | { |
98 | 98 | $fTypes[$type->file_type_id] = $type->description; |
99 | 99 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $custDetails = Customers::find($id); |
51 | 51 | |
52 | 52 | // Check for empty data set |
53 | - if(empty($custDetails)) |
|
53 | + if (empty($custDetails)) |
|
54 | 54 | { |
55 | 55 | return view('errors.customerNotFound'); |
56 | 56 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | Customers::find($id)->update($request->all()); |
86 | 86 | |
87 | 87 | // Modify to the new ID number if set |
88 | - if(isset($request->cust_id)) |
|
88 | + if (isset($request->cust_id)) |
|
89 | 89 | { |
90 | 90 | $id = $request->cust_id; |
91 | 91 | } |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | 'name' => $field |
60 | 60 | ]); |
61 | 61 | $id = $newField->data_type_id; |
62 | - } |
|
63 | - else |
|
62 | + } else |
|
64 | 63 | { |
65 | 64 | $id = $id->data_type_id; |
66 | 65 | } |
@@ -174,8 +173,7 @@ discard block |
||
174 | 173 | 'name' => $field |
175 | 174 | ]); |
176 | 175 | $id = $newField->data_type_id; |
177 | - } |
|
178 | - else |
|
176 | + } else |
|
179 | 177 | { |
180 | 178 | $id = $id->data_type_id; |
181 | 179 | } |
@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | $sysID = $sysData->sys_id; |
48 | 48 | $i = 0; |
49 | 49 | |
50 | - foreach($request->custField as $field) |
|
50 | + foreach ($request->custField as $field) |
|
51 | 51 | { |
52 | - if(!empty($field)) |
|
52 | + if (!empty($field)) |
|
53 | 53 | { |
54 | 54 | $id = SystemCustDataTypes::where('name', $field)->first(); |
55 | 55 | |
56 | - if(is_null($id)) |
|
56 | + if (is_null($id)) |
|
57 | 57 | { |
58 | 58 | $newField = SystemCustDataTypes::create([ |
59 | 59 | 'name' => $field |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | Log::info('New System Created', ['cat_id' => $request->catName, 'sys_name' => $request->name, 'user_id' => Auth::user()->user_id]); |
79 | 79 | |
80 | - return redirect()->back()->with('success', 'System Successfully Added');// |
|
80 | + return redirect()->back()->with('success', 'System Successfully Added'); // |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | // Pick a system to edit |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $sysData = SystemTypes::where('name', urldecode($id))->first(); |
97 | 97 | |
98 | 98 | // Verify the system we are trying to edit is valid |
99 | - if(!$sysData) |
|
99 | + if (!$sysData) |
|
100 | 100 | { |
101 | 101 | Log::warning('User '.Auth::user()->user_id.' tried to edit invalid system '.$id); |
102 | 102 | return view('errors.badSystem'); |
@@ -122,14 +122,14 @@ discard block |
||
122 | 122 | $sysName = SystemTypes::find($sysID)->name; |
123 | 123 | |
124 | 124 | // Verify the system we are trying to edit is valid |
125 | - if(!$sysName) |
|
125 | + if (!$sysName) |
|
126 | 126 | { |
127 | 127 | Log::warning('User '.Auth::user()->user_id.' tried to edit invalid system '.$sysID); |
128 | 128 | return view('errors.badSystem'); |
129 | 129 | } |
130 | 130 | |
131 | 131 | // Change the name of the system if it has been modified |
132 | - if($sysName !== $request->name) |
|
132 | + if ($sysName !== $request->name) |
|
133 | 133 | { |
134 | 134 | SystemTypes::find($sysID)->update([ |
135 | 135 | 'name' => $request->name |
@@ -142,19 +142,19 @@ discard block |
||
142 | 142 | ->get(); |
143 | 143 | |
144 | 144 | $i = 0; |
145 | - foreach($request->custField as $field) |
|
145 | + foreach ($request->custField as $field) |
|
146 | 146 | { |
147 | 147 | $found = false; |
148 | - if(!empty($field)) |
|
148 | + if (!empty($field)) |
|
149 | 149 | { |
150 | 150 | // Check if the field already exists |
151 | - foreach($dataType as $type) |
|
151 | + foreach ($dataType as $type) |
|
152 | 152 | { |
153 | - if($type->name === $field) |
|
153 | + if ($type->name === $field) |
|
154 | 154 | { |
155 | 155 | $found = true; |
156 | 156 | // See if the order has changed |
157 | - if($type->order != $i) |
|
157 | + if ($type->order != $i) |
|
158 | 158 | { |
159 | 159 | SystemCustDataFields::find($type->field_id)->update( |
160 | 160 | [ |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | } |
165 | 165 | } |
166 | 166 | // If the field does not exist, create it |
167 | - if(!$found) |
|
167 | + if (!$found) |
|
168 | 168 | { |
169 | 169 | $id = SystemCustDataTypes::where('name', $field)->first(); |
170 | 170 | |
171 | - if(is_null($id)) |
|
171 | + if (is_null($id)) |
|
172 | 172 | { |
173 | 173 | $newField = SystemCustDataTypes::create([ |
174 | 174 | 'name' => $field |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | // Check and verify that the user has permission to visit the request page |
12 | 12 | public function handle($request, Closure $next) |
13 | 13 | { |
14 | - if($request->user() === null) |
|
14 | + if ($request->user() === null) |
|
15 | 15 | { |
16 | 16 | Log::alert($request->route().' denied for Guest'); |
17 | 17 | return response()->view('errors.401', [], 401); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $actions = $request->route()->getAction(); |
20 | 20 | $roles = isset($actions['roles']) ? $actions['roles'] : null; |
21 | 21 | |
22 | - if($request->user()->hasAnyRole($roles) || !$roles) |
|
22 | + if ($request->user()->hasAnyRole($roles) || !$roles) |
|
23 | 23 | { |
24 | 24 | return $next($request); |
25 | 25 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | return (new MailMessage) |
32 | 32 | ->line('A new file has been uploaded to the file link - '.$this->details->link_name) |
33 | 33 | ->action('Click to View Link', |
34 | - url(route('links.info', [ |
|
35 | - 'id' => $this->details->link_id, |
|
36 | - 'name' => urlencode($this->details->link_name) |
|
34 | + url(route('links.info', [ |
|
35 | + 'id' => $this->details->link_id, |
|
36 | + 'name' => urlencode($this->details->link_name) |
|
37 | 37 | ]))); |
38 | 38 | } |
39 | 39 | |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | 'type' => 'warning', |
45 | 45 | 'message' => 'New File Uploaded to link - '.$this->details->link_name, |
46 | 46 | 'link' => url(route('links.info', [ |
47 | - 'id' => $this->details->link_id, |
|
48 | - 'name' => urlencode($this->details->link_name) |
|
47 | + 'id' => $this->details->link_id, |
|
48 | + 'name' => urlencode($this->details->link_name) |
|
49 | 49 | ])) |
50 | 50 | ]; |
51 | 51 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function up() |
16 | 16 | { |
17 | - Schema::create('customer_file_types', function (Blueprint $table) { |
|
17 | + Schema::create('customer_file_types', function(Blueprint $table) { |
|
18 | 18 | $table->increments('file_type_id'); |
19 | 19 | $table->text('description'); |
20 | 20 | $table->timestamps(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('system_cust_data_fields', function (Blueprint $table) { |
|
16 | + Schema::create('system_cust_data_fields', function(Blueprint $table) { |
|
17 | 17 | $table->increments('field_id'); |
18 | 18 | $table->integer('sys_id')->unsigned(); |
19 | 19 | $table->integer('data_type_id')->unsigned(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('notifications', function (Blueprint $table) { |
|
16 | + Schema::create('notifications', function(Blueprint $table) { |
|
17 | 17 | $table->uuid('id')->primary(); |
18 | 18 | $table->string('type'); |
19 | 19 | $table->morphs('notifiable'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('file_link_instructions', function (Blueprint $table) { |
|
16 | + Schema::create('file_link_instructions', function(Blueprint $table) { |
|
17 | 17 | $table->increments('link_instructions_id'); |
18 | 18 | $table->integer('link_id')->unsigned(); |
19 | 19 | $table->longText('instruction')->nullable(); |