1 | <?php |
||
18 | class NotificationServiceProvider extends ServiceProvider |
||
19 | { |
||
20 | use CanPublishConfiguration, CanGetSidebarClassForModule; |
||
21 | /** |
||
22 | * Indicates if loading of the provider is deferred. |
||
23 | * |
||
24 | * @var bool |
||
25 | */ |
||
26 | protected $defer = false; |
||
27 | |||
28 | /** |
||
29 | * Register the service provider. |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | public function register() |
||
43 | |||
44 | public function boot() |
||
45 | { |
||
46 | $this->publishConfig('notification', 'config'); |
||
47 | $this->publishConfig('notification', 'permissions'); |
||
48 | $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * Get the services provided by the provider. |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | public function provides() |
||
60 | |||
61 | private function registerBindings() |
||
80 | |||
81 | private function registerViewComposers() |
||
85 | } |
||
86 |
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: