update
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user