| 1 | <?php |
||
| 9 | trait SortableHandlerTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Switch table order for making sortable table. |
||
| 13 | * |
||
| 14 | * @return \Illuminate\Http\RedirectResponse |
||
| 15 | * @throws PermissionDenied |
||
| 16 | */ |
||
| 17 | public function switchSortable() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Change sort weight of dragged row. |
||
| 34 | * |
||
| 35 | * @param $id |
||
| 36 | * @param Request $request |
||
| 37 | * @return \Illuminate\Http\JsonResponse |
||
| 38 | * @throws PermissionDenied |
||
| 39 | */ |
||
| 40 | public function moveItem($id, Request $request) |
||
| 55 | |||
| 56 | abstract protected function init(); |
||
| 60 | } |
||
| 61 |
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: