1 | <?php namespace JobApis\JobsToMail\Notifications; |
||
10 | class JobsCollected extends Notification implements ShouldQueue |
||
11 | { |
||
12 | use Queueable, SerializesModels; |
||
13 | |||
14 | /** |
||
15 | * @var array of Job objects |
||
16 | */ |
||
17 | protected $jobs; |
||
18 | |||
19 | /** |
||
20 | * @var Search |
||
21 | */ |
||
22 | protected $search; |
||
23 | |||
24 | /** |
||
25 | * Create a new notification instance. |
||
26 | * |
||
27 | * @param array $jobs |
||
28 | * @param Search $search |
||
29 | * |
||
30 | * @return void |
||
|
|||
31 | */ |
||
32 | 6 | public function __construct(array $jobs, Search $search) |
|
37 | |||
38 | /** |
||
39 | * Get the notification's delivery channels. |
||
40 | * |
||
41 | * @param mixed $notifiable |
||
42 | * @return array |
||
43 | */ |
||
44 | 1 | public function via($notifiable) |
|
48 | |||
49 | /** |
||
50 | * Get the array representation of the notification for saving to the database. |
||
51 | * |
||
52 | * @param mixed $notifiable |
||
53 | * @return array |
||
54 | */ |
||
55 | 1 | public function toArray($notifiable) |
|
62 | |||
63 | /** |
||
64 | * Get the mail representation of the notification. |
||
65 | * |
||
66 | * @param mixed $notifiable |
||
67 | * @return \Illuminate\Notifications\Messages\MailMessage |
||
68 | */ |
||
69 | 2 | public function toMail($notifiable) |
|
102 | } |
||
103 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.