1 | <?php |
||||||
2 | |||||||
3 | namespace UniSharp\LaravelFilemanager\Controllers; |
||||||
4 | |||||||
5 | use Illuminate\Support\Facades\Storage; |
||||||
6 | |||||||
7 | class DownloadController extends LfmController |
||||||
8 | { |
||||||
9 | public function getDownload() |
||||||
10 | { |
||||||
11 | $file = $this->lfm->setName(request('file')); |
||||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
The property
lfm does not exist on UniSharp\LaravelFilemana...lers\DownloadController . Since you implemented __get , consider adding a @property annotation.
Loading history...
The method
setName() does not exist on null .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.
Loading history...
|
|||||||
12 | |||||||
13 | if (!Storage::disk($this->helper->config('disk'))->exists($file->path('storage'))) { |
||||||
0 ignored issues
–
show
The property
helper does not exist on UniSharp\LaravelFilemana...lers\DownloadController . Since you implemented __get , consider adding a @property annotation.
Loading history...
The method
config() does not exist on null .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.
Loading history...
|
|||||||
14 | abort(404); |
||||||
0 ignored issues
–
show
The function
abort was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
15 | } |
||||||
16 | |||||||
17 | return Storage::disk($this->helper->config('disk'))->download($file->path('storage')); |
||||||
18 | } |
||||||
19 | } |
||||||
20 |