1 | <?php |
||
7 | abstract class ModuleAdmin extends Admin |
||
8 | { |
||
9 | /** |
||
10 | * The Controller to be used by the Module Admin. |
||
11 | * |
||
12 | * This defaults to parent::getController() |
||
13 | * if it has been left undefined. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $controller = '\LaravelFlare\Flare\Admin\Modules\ModuleAdminController'; |
||
18 | |||
19 | /** |
||
20 | * The Module Admin Default View. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $view = 'admin.modules.index'; |
||
25 | |||
26 | /** |
||
27 | * Returns the Module Admin View. |
||
28 | * |
||
29 | * Determines if a view exists by: |
||
30 | * Looking for $this->view |
||
31 | * Then looks for 'admin.modulename.index', |
||
32 | * Then looks for 'admin.modulename', |
||
33 | * Then defaults to |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getView() |
||
57 | } |
||
58 |
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: