1 | <?php |
||
7 | class BadgeNotification extends Notification |
||
8 | { |
||
9 | use Queueable; |
||
10 | |||
11 | public $badge; |
||
12 | |||
13 | /** |
||
14 | * Create a new notification instance. |
||
15 | * |
||
16 | * @return void |
||
|
|||
17 | */ |
||
18 | public function __construct($badge) |
||
22 | |||
23 | /** |
||
24 | * Get the notification's delivery channels. |
||
25 | * |
||
26 | * @param mixed $notifiable |
||
27 | * |
||
28 | * @return array |
||
29 | */ |
||
30 | public function via($notifiable): array |
||
34 | |||
35 | /** |
||
36 | * Get the array representation of the notification. |
||
37 | * |
||
38 | * @param mixed $notifiable |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function toDatabase($notifiable): array |
||
51 | } |
||
52 |
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.