1 | <?php |
||
9 | class MediaLibraryController extends Controller |
||
10 | { |
||
11 | /** |
||
12 | * Store a newly created resource in storage. |
||
13 | * |
||
14 | * @param StoreFormRequest $request |
||
15 | * @param Filesystem $files |
||
16 | * @return \Illuminate\Http\JsonResponse |
||
17 | */ |
||
18 | public function store(StoreFormRequest $request, Filesystem $files) |
||
35 | |||
36 | /** |
||
37 | * Remove the specified resource from storage. |
||
38 | * |
||
39 | * @param Request $request |
||
40 | */ |
||
41 | public function destroy(Request $request, Filesystem $files) |
||
49 | } |
||
50 |
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: