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