1 | <?php |
||
10 | class EventCategoryTranslationController extends Controller |
||
11 | { |
||
12 | /* Restrict the access to this resource just to logged in users */ |
||
13 | public function __construct() |
||
17 | |||
18 | /** |
||
19 | * Display a listing of the resource. |
||
20 | * |
||
21 | * @return \Illuminate\Http\Response |
||
22 | */ |
||
23 | /*public function index() |
||
24 | { |
||
25 | // |
||
26 | }*/ |
||
27 | |||
28 | /** |
||
29 | * Show the form for creating a new resource. |
||
30 | * @param int $eventCategoryId |
||
31 | * @param int $languageCode |
||
32 | * @return \Illuminate\Http\Response |
||
33 | */ |
||
34 | public function create($eventCategoryId, $languageCode) |
||
43 | |||
44 | /** |
||
45 | * Store a newly created resource in storage. |
||
46 | * |
||
47 | * @param \Illuminate\Http\Request $request |
||
48 | * @return \Illuminate\Http\Response |
||
49 | */ |
||
50 | public function store(Request $request) |
||
72 | |||
73 | /** |
||
74 | * Display the specified resource. |
||
75 | * |
||
76 | * @param \App\EventCategoryTranslation $eventCategoryTranslation |
||
77 | * @return \Illuminate\Http\Response |
||
78 | */ |
||
79 | /*public function show(EventCategoryTranslation $eventCategoryTranslation) |
||
80 | { |
||
81 | // |
||
82 | }*/ |
||
83 | |||
84 | /** |
||
85 | * Show the form for editing the specified resource. |
||
86 | * @param int $eventCategoryId |
||
87 | * @param int $languageCode |
||
88 | * @return \Illuminate\Http\Response |
||
89 | */ |
||
90 | public function edit($eventCategoryId, $languageCode) |
||
103 | |||
104 | /** |
||
105 | * Update the specified resource in storage. |
||
106 | * |
||
107 | * @param \Illuminate\Http\Request $request |
||
108 | * @return \Illuminate\Http\Response |
||
109 | */ |
||
110 | public function update(Request $request) |
||
126 | |||
127 | /** |
||
128 | * Remove the specified resource from storage. |
||
129 | * |
||
130 | * @param \App\EventCategoryTranslation $eventCategoryTranslation |
||
131 | * @return \Illuminate\Http\Response |
||
132 | */ |
||
133 | public function destroy($eventCategoryTranslationId) |
||
141 | } |
||
142 |
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: