protected function getDefaultAttributes($notification)
{
if (!$notification instanceof Notification) {
throw new InvalidArgumentException(get_class($this) . ' can only serialize instances of ' . Notification::class);
}
return ['id' => (int) $notification->id, 'contentType' => $notification->type, 'content' => $notification->data, 'time' => $this->formatDate($notification->time), 'isRead' => (bool) $notification->is_read];
}