1 | <?php namespace JobApis\JobsToMail\Jobs\Notifications; |
||
6 | class GetNotificationById |
||
7 | { |
||
8 | /** |
||
9 | * @var string $id Notification ID |
||
10 | */ |
||
11 | protected $id; |
||
12 | |||
13 | /** |
||
14 | * Create a new job instance. |
||
15 | */ |
||
16 | public function __construct($id = null) |
||
20 | |||
21 | /** |
||
22 | * Get a single notification by ID |
||
23 | * |
||
24 | * @return Builder |
||
25 | */ |
||
26 | public function handle(CustomDatabaseNotification $notifications) |
||
32 | } |
||
33 |
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: