1 | <?php namespace Arcanesoft\Blog\ViewComposers\Front\Widgets; |
||
16 | class CategoriesWidgetComposer extends AbstractComposer |
||
17 | { |
||
18 | /* ----------------------------------------------------------------- |
||
19 | | Constants |
||
20 | | ----------------------------------------------------------------- |
||
21 | */ |
||
22 | |||
23 | const VIEW = 'blog::front._composers.widgets.categories-widget'; |
||
24 | |||
25 | /* ----------------------------------------------------------------- |
||
26 | | Main Methods |
||
27 | | ----------------------------------------------------------------- |
||
28 | */ |
||
29 | |||
30 | /** |
||
31 | * Compose the view. |
||
32 | * |
||
33 | * @param \Illuminate\Contracts\View\View $view |
||
34 | */ |
||
35 | public function compose(View $view) |
||
50 | } |
||
51 |
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: