| 1 | <?php |
||
| 5 | class TooltipDirective |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Tooltip blade directive compiler. |
||
| 9 | * @tooltip($tooltip, $template) |
||
| 10 | * |
||
| 11 | * @param string $tooltip |
||
| 12 | * @param string $template |
||
| 13 | * @return string |
||
| 14 | * @throws \Exception |
||
| 15 | * @throws \Throwable |
||
| 16 | */ |
||
| 17 | public function handle($tooltip, $template = 'system.tooltip') |
||
| 23 | } |
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: