1 | <?php |
||
11 | class DocumentsController extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * Display a listing of the resource. |
||
15 | * |
||
16 | * @return Response |
||
17 | */ |
||
18 | public function index(SearchDocumentsRequest $request, DocumentsIndex $se) |
||
41 | |||
42 | /** |
||
43 | * Show the form for creating a new resource. |
||
44 | * |
||
45 | * @return Response |
||
46 | */ |
||
47 | public function create() |
||
51 | |||
52 | /** |
||
53 | * Store a newly created resource in storage. |
||
54 | * |
||
55 | * @return Response |
||
56 | */ |
||
57 | public function store() |
||
61 | |||
62 | /** |
||
63 | * Display the specified resource. |
||
64 | * |
||
65 | * @param DocumentsIndex $se |
||
66 | * @param int $id |
||
67 | * |
||
68 | * @return Response |
||
69 | */ |
||
70 | public function show(Request $request, DocumentsIndex $se, $id) |
||
88 | |||
89 | /** |
||
90 | * Show the form for editing the specified resource. |
||
91 | * |
||
92 | * @param int $id |
||
93 | * |
||
94 | * @return Response |
||
95 | */ |
||
96 | public function edit($id) |
||
100 | |||
101 | /** |
||
102 | * Update the specified resource in storage. |
||
103 | * |
||
104 | * @param int $id |
||
105 | * |
||
106 | * @return Response |
||
107 | */ |
||
108 | public function update($id) |
||
112 | |||
113 | /** |
||
114 | * Remove the specified resource from storage. |
||
115 | * |
||
116 | * @param int $id |
||
117 | * |
||
118 | * @return Response |
||
119 | */ |
||
120 | public function destroy($id) |
||
124 | |||
125 | protected function getDocumentFromSomeId($document_id) |
||
137 | |||
138 | /** |
||
139 | * Show cover. |
||
140 | * |
||
141 | * @return Response |
||
142 | */ |
||
143 | public function cover($document_id) |
||
151 | |||
152 | /** |
||
153 | * Store cover. |
||
154 | * |
||
155 | * @return Response |
||
156 | */ |
||
157 | public function storeCover($document_id, Request $request, DocumentsIndex $se) |
||
203 | |||
204 | /** |
||
205 | * Store description. |
||
206 | * |
||
207 | * @return Response |
||
208 | */ |
||
209 | public function storeDescription($document_id, Request $request, DocumentsIndex $se) |
||
234 | |||
235 | /** |
||
236 | * Store "Cannot find cover" |
||
237 | * |
||
238 | * @return Response |
||
239 | */ |
||
240 | public function cannotFindCover($document_id, Request $request, DocumentsIndex $se) |
||
265 | } |
||
266 |
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: