@@ -77,7 +77,7 @@ |
||
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 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | // Backup landing page |
20 | 20 | public function index() |
21 | - { |
|
21 | + { |
|
22 | 22 | return view('installer.backupIndex'); |
23 | 23 | } |
24 | 24 |
@@ -49,19 +49,19 @@ discard block |
||
49 | 49 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
50 | 50 | |
51 | 51 | // check if the upload is success, throw exception or return response you need |
52 | - if ($receiver->isUploaded() === false) { |
|
52 | + if($receiver->isUploaded() === false) { |
|
53 | 53 | throw new UploadMissingFileException(); |
54 | 54 | } |
55 | 55 | |
56 | 56 | // receive the file |
57 | 57 | $save = $receiver->receive(); |
58 | 58 | // check if the upload has finished (in chunk mode it will send smaller files) |
59 | - if ($save->isFinished()) { |
|
59 | + if($save->isFinished()) { |
|
60 | 60 | do |
61 | 61 | { |
62 | 62 | $hash = strtolower(str_random(15)); |
63 | 63 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
64 | - }while($dup != 0); |
|
64 | + } while($dup != 0); |
|
65 | 65 | |
66 | 66 | // Create the new file link |
67 | 67 | $link = FileLinks::create([ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ]); |
74 | 74 | $linkID = $link->link_id; |
75 | 75 | |
76 | - $fileID = $this->newLinkFile($save->getFile(), $linkID); |
|
76 | + $fileID = $this->newLinkFile($save->getFile(), $linkID); |
|
77 | 77 | |
78 | 78 | // Place the file in the file link files table of DB |
79 | 79 | FileLinkFiles::create([ |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | $hash = strtolower(str_random(15)); |
102 | 102 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
103 | - }while($dup != 0); |
|
103 | + } while($dup != 0); |
|
104 | 104 | |
105 | 105 | // Create the new file link |
106 | 106 | $link = FileLinks::create([ |
@@ -215,14 +215,14 @@ discard block |
||
215 | 215 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
216 | 216 | |
217 | 217 | // check if the upload is success, throw exception or return response you need |
218 | - if ($receiver->isUploaded() === false) { |
|
218 | + if($receiver->isUploaded() === false) { |
|
219 | 219 | throw new UploadMissingFileException(); |
220 | 220 | } |
221 | 221 | |
222 | 222 | // receive the file |
223 | 223 | $save = $receiver->receive(); |
224 | 224 | // check if the upload has finished (in chunk mode it will send smaller files) |
225 | - if ($save->isFinished()) { |
|
225 | + if($save->isFinished()) { |
|
226 | 226 | return $this->saveFile($save->getFile(), $id); |
227 | 227 | } |
228 | 228 | // we are in chunk mode, lets send the current progress |
@@ -49,14 +49,16 @@ discard block |
||
49 | 49 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
50 | 50 | |
51 | 51 | // check if the upload is success, throw exception or return response you need |
52 | - if ($receiver->isUploaded() === false) { |
|
52 | + if ($receiver->isUploaded() === false) |
|
53 | + { |
|
53 | 54 | throw new UploadMissingFileException(); |
54 | 55 | } |
55 | 56 | |
56 | 57 | // receive the file |
57 | 58 | $save = $receiver->receive(); |
58 | 59 | // check if the upload has finished (in chunk mode it will send smaller files) |
59 | - if ($save->isFinished()) { |
|
60 | + if ($save->isFinished()) |
|
61 | + { |
|
60 | 62 | do |
61 | 63 | { |
62 | 64 | $hash = strtolower(str_random(15)); |
@@ -215,14 +217,16 @@ discard block |
||
215 | 217 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
216 | 218 | |
217 | 219 | // check if the upload is success, throw exception or return response you need |
218 | - if ($receiver->isUploaded() === false) { |
|
220 | + if ($receiver->isUploaded() === false) |
|
221 | + { |
|
219 | 222 | throw new UploadMissingFileException(); |
220 | 223 | } |
221 | 224 | |
222 | 225 | // receive the file |
223 | 226 | $save = $receiver->receive(); |
224 | 227 | // check if the upload has finished (in chunk mode it will send smaller files) |
225 | - if ($save->isFinished()) { |
|
228 | + if ($save->isFinished()) |
|
229 | + { |
|
226 | 230 | return $this->saveFile($save->getFile(), $id); |
227 | 231 | } |
228 | 232 | // we are in chunk mode, lets send the current progress |
@@ -66,14 +66,14 @@ |
||
66 | 66 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
67 | 67 | |
68 | 68 | // check if the upload is success, throw exception or return response you need |
69 | - if ($receiver->isUploaded() === false) { |
|
69 | + if($receiver->isUploaded() === false) { |
|
70 | 70 | throw new UploadMissingFileException(); |
71 | 71 | } |
72 | 72 | |
73 | 73 | // receive the file |
74 | 74 | $save = $receiver->receive(); |
75 | 75 | // check if the upload has finished (in chunk mode it will send smaller files) |
76 | - if ($save->isFinished()) |
|
76 | + if($save->isFinished()) |
|
77 | 77 | { |
78 | 78 | // Get the folder location for the system |
79 | 79 | $folder = SystemTypes::where('name', $request['system'])->first()->folder_location; |
@@ -33,11 +33,9 @@ discard block |
||
33 | 33 | // Ajax load to load the file for the system |
34 | 34 | public function loadFiles($sysName, $fileType) |
35 | 35 | { |
36 | - $fileList = SystemFiles::whereHas('SystemTypes', function($q) use($sysName) |
|
37 | - { |
|
36 | + $fileList = SystemFiles::whereHas('SystemTypes', function($q) use($sysName) { |
|
38 | 37 | $q->where('name', urldecode($sysName)); |
39 | - })->whereHas('SystemFileTypes', function($q) use($fileType) |
|
40 | - { |
|
38 | + })->whereHas('SystemFileTypes', function($q) use($fileType) { |
|
41 | 39 | $q->where('description', urldecode($fileType)); |
42 | 40 | })->with('user')->with('files')->get(); |
43 | 41 | |
@@ -66,14 +64,15 @@ discard block |
||
66 | 64 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
67 | 65 | |
68 | 66 | // check if the upload is success, throw exception or return response you need |
69 | - if ($receiver->isUploaded() === false) { |
|
67 | + if ($receiver->isUploaded() === false) |
|
68 | + { |
|
70 | 69 | throw new UploadMissingFileException(); |
71 | 70 | } |
72 | 71 | |
73 | 72 | // receive the file |
74 | 73 | $save = $receiver->receive(); |
75 | 74 | // check if the upload has finished (in chunk mode it will send smaller files) |
76 | - if ($save->isFinished()) |
|
75 | + if ($save->isFinished()) |
|
77 | 76 | { |
78 | 77 | // Get the folder location for the system |
79 | 78 | $folder = SystemTypes::where('name', $request['system'])->first()->folder_location; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | Log::info('Tech Bench Settings Updated', ['user_id' => Auth::user()->user_id]); |
69 | 69 | |
70 | - return redirect()->back()->with('success', 'Tech Bench Successfully Updated');// |
|
70 | + return redirect()->back()->with('success', 'Tech Bench Successfully Updated'); // |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // Upload and submit a new site logo |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | |
154 | 154 | Log::info('Email Settings have been changed by User ID-'.Auth::user()->user_id); |
155 | - return redirect()->back()->with('success', 'Tech Bench Successfully Updated');// |
|
155 | + return redirect()->back()->with('success', 'Tech Bench Successfully Updated'); // |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | // User settings form |
@@ -56,14 +56,14 @@ |
||
56 | 56 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
57 | 57 | |
58 | 58 | // check if the upload is success, throw exception or return response you need |
59 | - if ($receiver->isUploaded() === false) { |
|
59 | + if($receiver->isUploaded() === false) { |
|
60 | 60 | throw new UploadMissingFileException(); |
61 | 61 | } |
62 | 62 | |
63 | 63 | // receive the file |
64 | 64 | $save = $receiver->receive(); |
65 | 65 | // check if the upload has finished (in chunk mode it will send smaller files) |
66 | - if ($save->isFinished()) { |
|
66 | + if($save->isFinished()) { |
|
67 | 67 | |
68 | 68 | |
69 | 69 | $fileID = $this->saveFile($save->getFile(), $filePath); |
@@ -56,14 +56,16 @@ |
||
56 | 56 | $receiver = new FileReceiver("file", $request, HandlerFactory::classFromRequest($request)); |
57 | 57 | |
58 | 58 | // check if the upload is success, throw exception or return response you need |
59 | - if ($receiver->isUploaded() === false) { |
|
59 | + if ($receiver->isUploaded() === false) |
|
60 | + { |
|
60 | 61 | throw new UploadMissingFileException(); |
61 | 62 | } |
62 | 63 | |
63 | 64 | // receive the file |
64 | 65 | $save = $receiver->receive(); |
65 | 66 | // check if the upload has finished (in chunk mode it will send smaller files) |
66 | - if ($save->isFinished()) { |
|
67 | + if ($save->isFinished()) |
|
68 | + { |
|
67 | 69 | |
68 | 70 | |
69 | 71 | $fileID = $this->saveFile($save->getFile(), $filePath); |
@@ -41,8 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | // Get the types of systems belonging to the category |
44 | - $sysList = SystemTypes::whereHas('SystemCategories', function($q) use($cat) |
|
45 | - { |
|
44 | + $sysList = SystemTypes::whereHas('SystemCategories', function($q) use($cat) { |
|
46 | 45 | $q->where('name', $cat); |
47 | 46 | })->get(); |
48 | 47 | |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | $fileTypes = SystemFileTypes::all(); |
69 | 68 | |
70 | 69 | // Get the latest Tech Tips for this system |
71 | - $tipData = TechTips::whereHas('TechTipSystems', function($q) use($valid) |
|
72 | - { |
|
70 | + $tipData = TechTips::whereHas('TechTipSystems', function($q) use($valid) { |
|
73 | 71 | $q->where('sys_id', $valid->sys_id); |
74 | 72 | })->orderBy('created_at', 'DESC')->get(); |
75 | 73 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | if(!empty(array_filter($request['phoneNumber']))) |
53 | 53 | { |
54 | 54 | $num = count($request['phoneNumber']); |
55 | - for($i=0; $i < $num; $i++) |
|
55 | + for($i = 0; $i < $num; $i++) |
|
56 | 56 | { |
57 | 57 | if(!empty($request['phoneNumber'][$i])) |
58 | 58 | { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | if(!empty(array_filter($request['phoneNumber']))) |
117 | 117 | { |
118 | 118 | $num = count($request['phoneNumber']); |
119 | - for($i=0; $i < $num; $i++) |
|
119 | + for($i = 0; $i < $num; $i++) |
|
120 | 120 | { |
121 | 121 | CustomerContactPhones::create([ |
122 | 122 | 'cont_id' => $id, |
@@ -151,7 +151,7 @@ |
||
151 | 151 | |
152 | 152 | $newFile = Files::create([ |
153 | 153 | 'file_name' => $fileName, |
154 | - 'file_link' => $filePath . DIRECTORY_SEPARATOR |
|
154 | + 'file_link' => $filePath.DIRECTORY_SEPARATOR |
|
155 | 155 | ]); |
156 | 156 | $fileID = $newFile->file_id; |
157 | 157 |