This commit is contained in:
2026-03-20 21:17:26 +01:00
parent 1a62fcb81d
commit 29c3ff8572
229 changed files with 13147 additions and 2577 deletions

View File

@@ -24,6 +24,13 @@ class StoryStatusNotification extends Notification
return ['database'];
}
public function databaseType(object $notifiable): string
{
return in_array($this->event, ['approved', 'published'], true)
? 'story_published'
: 'story_status';
}
public function toDatabase(object $notifiable): array
{
$message = match ($this->event) {
@@ -34,7 +41,9 @@ class StoryStatusNotification extends Notification
};
return [
'type' => 'story.' . $this->event,
'type' => in_array($this->event, ['approved', 'published'], true)
? 'story_published'
: 'story.' . $this->event,
'story_id' => $this->story->id,
'title' => $this->story->title,
'slug' => $this->story->slug,