/ app / Notifications / RectifyNotReceivedNotification.php
RectifyNotReceivedNotification.php
 1  <?php
 2  
 3  namespace App\Notifications;
 4  
 5  use App\Models\Dossier;
 6  use App\Models\User;
 7  use Illuminate\Bus\Queueable;
 8  use Illuminate\Notifications\Notification;
 9  
10  class RectifyNotReceivedNotification extends Notification
11  {
12      use Queueable;
13      
14      public function __construct(public Dossier $dossier)
15      {
16      }
17  
18      public function via($notifiable): array
19      {
20          return ['database'];
21      }
22  
23      public function toArray($notifiable): array
24      {
25          return [
26              'user_id' => $notifiable->id,
27              'title' => __('notifications.message-title.RectifyNotReceivedNotification', [
28                  'dossierCode' => $this->dossier->code,
29              ]),
30              'message' => __('notifications.messages.RectifyNotReceivedNotification', [
31                  'dossierCode' => $this->dossier->code,
32              ]),
33          ];
34      }
35  }