@@ -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 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | { |
| 41 | 41 | $hash = strtolower(str_random(15)); |
| 42 | 42 | $dup = FileLinks::where('link_hash', $hash)->get()->count(); |
| 43 | - }while($dup != 0); |
|
| 43 | + } while ($dup != 0); |
|
| 44 | 44 | |
| 45 | 45 | // Create the new file link |
| 46 | 46 | $link = FileLinks::create([ |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | $linkID = $link->link_id; |
| 54 | 54 | |
| 55 | 55 | // If there are any files, process them |
| 56 | - if(!empty($request->file)) |
|
| 56 | + if (!empty($request->file)) |
|
| 57 | 57 | { |
| 58 | 58 | $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$linkID; |
| 59 | - foreach($request->file as $file) |
|
| 59 | + foreach ($request->file as $file) |
|
| 60 | 60 | { |
| 61 | 61 | // Clean the file and store it |
| 62 | 62 | $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName()); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | { |
| 106 | 106 | $linkData = FileLinks::find($id); |
| 107 | 107 | |
| 108 | - if(empty($linkData)) |
|
| 108 | + if (empty($linkData)) |
|
| 109 | 109 | { |
| 110 | 110 | return view('links.badLink'); |
| 111 | 111 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | public function getFiles($type, $linkID) |
| 120 | 120 | { |
| 121 | 121 | $files = null; |
| 122 | - switch($type) |
|
| 122 | + switch ($type) |
|
| 123 | 123 | { |
| 124 | 124 | case 'down': |
| 125 | 125 | $files = FileLInkFiles::where('link_id', $linkID) |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | public function submitAddFile($id, Request $request) |
| 155 | 155 | { |
| 156 | 156 | $filePath = config('filesystems.paths.links').DIRECTORY_SEPARATOR.$id; |
| 157 | - foreach($request->file as $file) |
|
| 157 | + foreach ($request->file as $file) |
|
| 158 | 158 | { |
| 159 | 159 | // Clean the file and store it |
| 160 | 160 | $fileName = Files::cleanFilename($filePath, $file->getClientOriginalName()); |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | { |
| 231 | 231 | // Remove the file from database |
| 232 | 232 | $data = FileLinkFiles::where('link_id', $id)->get(); |
| 233 | - if(!$data->isEmpty()) |
|
| 233 | + if (!$data->isEmpty()) |
|
| 234 | 234 | { |
| 235 | - foreach($data as $file) |
|
| 235 | + foreach ($data as $file) |
|
| 236 | 236 | { |
| 237 | 237 | $fileID = $file->file_id; |
| 238 | 238 | $file->delete(); |