| 1 | <?php |
||
| 14 | final class Testimony extends UuidModel |
||
| 15 | { |
||
| 16 | use BelongsToMinistryTrait; |
||
| 17 | use BelongsToUserTrait; |
||
| 18 | use TitleTrait; |
||
| 19 | use CommentableTrait; |
||
| 20 | use ImageableTrait; |
||
| 21 | use StorageTrait; |
||
| 22 | |||
| 23 | protected $table = 'fg_testimonies'; |
||
| 24 | |||
| 25 | public function filesDir() |
||
| 29 | |||
| 30 | public function getFileName(): array |
||
| 36 | |||
| 37 | public function scopeApproved($query, User $user = null) |
||
| 55 | } |
||
| 56 |
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: