/ app / Notifications / CertificationReportNotCreatedNotification.php
CertificationReportNotCreatedNotification.php
 1  <?php
 2  
 3  namespace App\Notifications;
 4  
 5  use App\Models\Dossier;
 6  use Illuminate\Bus\Queueable;
 7  use Illuminate\Contracts\Queue\ShouldQueue;
 8  use Illuminate\Notifications\Notification;
 9  
10  class CertificationReportNotCreatedNotification extends Notification implements ShouldQueue
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.CertificationReportNotCreatedNotification', [
28                  'dossierCode' => $this->dossier->code,
29              ]),
30              'message' => __('notifications.messages.CertificationReportNotCreatedNotification', [
31                  'dossierCode' => $this->dossier->code,
32              ]),
33          ];
34      }
35  }