3 namespace BookStack\Activity\Notifications\Messages;
5 use BookStack\Activity\Models\Loggable;
6 use BookStack\Activity\Notifications\MessageParts\LinkedMailMessageLine;
7 use BookStack\Notifications\MailNotification;
8 use BookStack\Users\Models\User;
9 use Illuminate\Bus\Queueable;
11 abstract class BaseActivityNotification extends MailNotification
15 public function __construct(
16 protected Loggable|string $detail,
22 * Get the array representation of the notification.
24 * @param mixed $notifiable
27 public function toArray($notifiable)
30 'activity_detail' => $this->detail,
31 'activity_creator' => $this->user,
36 * Build the common reason footer line used in mail messages.
38 protected function buildReasonFooterLine(string $language): LinkedMailMessageLine
40 return new LinkedMailMessageLine(
41 url('/preferences/notifications'),
42 trans('notifications.footer_reason', [], $language),
43 trans('notifications.footer_reason_link', [], $language),