@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | |
5 | -$factory->define(App\SystemTypes::class, function (Faker $faker) { |
|
5 | +$factory->define(App\SystemTypes::class, function(Faker $faker) { |
|
6 | 6 | return [ |
7 | 7 | 'sys_id' => 1, |
8 | 8 | 'cat_id' => 1, |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Faker\Generator as Faker; |
4 | 4 | |
5 | -$factory->define(App\SystemCategories::class, function (Faker $faker) { |
|
5 | +$factory->define(App\SystemCategories::class, function(Faker $faker) { |
|
6 | 6 | return [ |
7 | 7 | 'cat_id' => 1, |
8 | 8 | 'name' => $faker->jobTitle() |
@@ -126,7 +126,7 @@ |
||
126 | 126 | public function edit($id) |
127 | 127 | { |
128 | 128 | $system = SystemTypes::find($id); |
129 | - $dataTypes = SystemCustDataTypes::orderBy('name', 'ASC')->get(); |
|
129 | + $dataTypes = SystemCustDataTypes::orderBy('name', 'ASC')->get(); |
|
130 | 130 | |
131 | 131 | $dropDown = []; |
132 | 132 | foreach($dataTypes as $type) |
@@ -3,14 +3,14 @@ |
||
3 | 3 | use Illuminate\Support\Str; |
4 | 4 | use Faker\Generator as Faker; |
5 | 5 | |
6 | -$factory->define(App\Files::class, function (Faker $faker) { |
|
6 | +$factory->define(App\Files::class, function(Faker $faker) { |
|
7 | 7 | return [ |
8 | 8 | 'file_name' => Str::random(5).$faker->fileExtension, |
9 | 9 | 'file_link' => 'random/path' |
10 | 10 | ]; |
11 | 11 | }); |
12 | 12 | |
13 | -$factory->define(App\SystemFiles::class, function (Faker $faker) use ($factory) { |
|
13 | +$factory->define(App\SystemFiles::class, function(Faker $faker) use ($factory) { |
|
14 | 14 | return [ |
15 | 15 | 'sys_id' => 1, |
16 | 16 | 'type_id' => 1, |
@@ -39,8 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | // Get the types of systems belonging to the category |
42 | - $sysList = SystemTypes::whereHas('SystemCategories', function($q) use($cat) |
|
43 | - { |
|
42 | + $sysList = SystemTypes::whereHas('SystemCategories', function($q) use($cat) { |
|
44 | 43 | $q->where('name', $cat); |
45 | 44 | })->get(); |
46 | 45 |
@@ -81,7 +81,7 @@ |
||
81 | 81 | { |
82 | 82 | $fileID = $this->saveFile($save->getFile(), $linkID); |
83 | 83 | |
84 | - return response()->json(['success' => true]);; |
|
84 | + return response()->json(['success' => true]); ; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | // Get the current progress |
@@ -139,7 +139,7 @@ |
||
139 | 139 | { |
140 | 140 | $hash = strtolower(Str::random(15)); |
141 | 141 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
142 | - }while($dup != 0); |
|
142 | + } while($dup != 0); |
|
143 | 143 | |
144 | 144 | // If the "customer id" field is populated, separate the ID from the name and prepare for insertion. |
145 | 145 | if($data->customer_tag != null) |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ]); |
66 | 66 | |
67 | 67 | if(!empty($request->file)) |
68 | - { |
|
68 | + { |
|
69 | 69 | $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
70 | 70 | |
71 | 71 | // Verify that the upload is valid and being processed |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | // If there are no files being uploaded or the file uploade process is done |
98 | 98 | if(isset($request->_completed) && $request->_completed) |
99 | - { |
|
99 | + { |
|
100 | 100 | $linkID = $this->createLink($request); |
101 | 101 | if($request->session()->has('newLinkFile')) |
102 | 102 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | // Upload new file |
70 | 70 | public function update(Request $request, $id) |
71 | - { |
|
71 | + { |
|
72 | 72 | $request->validate(['name' => 'required', 'file' => 'required']); |
73 | 73 | |
74 | 74 | $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | // Save the file in the database |
103 | 103 | private function saveFile(UploadedFile $file, $id, $request) |
104 | - { |
|
104 | + { |
|
105 | 105 | $details = FileLinks::where('link_hash', $id)->first(); |
106 | 106 | $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$details->link_id; |
107 | 107 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | throw new UploadMissingFileException(); |
43 | 43 | } |
44 | 44 | |
45 | - // Recieve and process the file |
|
45 | + // Recieve and process the file |
|
46 | 46 | $save = $receiver->receive(); |
47 | 47 | |
48 | 48 | // See if the uploade has finished |