1 | <?php |
||
11 | class MediaLibraryController extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * Store a newly created resource in storage. |
||
15 | * |
||
16 | * @param StoreFormRequest $request |
||
17 | * @param Filesystem $files |
||
18 | * @return JsonResponse |
||
19 | */ |
||
20 | public function upload(StoreFormRequest $request, Filesystem $files) |
||
37 | |||
38 | /** |
||
39 | * Remove the specified resource from storage. |
||
40 | * |
||
41 | * @param Request $request |
||
42 | * @param Filesystem $files |
||
43 | * @return Response |
||
44 | */ |
||
45 | public function delete(Request $request, Filesystem $files) |
||
53 | } |
||
54 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: