*/ public function via(object $notifiable): array { return ['database']; } /** * @return array */ public function toDatabase(object $notifiable): array { return FilamentNotification::make() ->title(__('panel.reviews.notification.returned', [ 'name' => $this->returnedBy ?? __('panel.revisions.system'), ])) // The reason travels with the notification rather than waiting // behind a click: it is the entire content of the message. ->body(ContentTypes::title($this->record).' — '.$this->note) ->icon('heroicon-o-arrow-uturn-left') ->iconColor('danger') ->actions([ Action::make('open') ->label(__('panel.reviews.actions.open')) ->url(ReviewTarget::url($this->record)) ->markAsRead(), ]) ->getDatabaseMessage(); } }