toDatabase($notifiable); $notificationModel = new NotificationModel(); $notificationModel->id = \fast\Random::uuid(); $notificationModel->notification_type = $notification->notification_type; $notificationModel->type = $notification->event; $notificationModel->notifiable_id = $notifiable['id']; $notificationModel->notifiable_type = $notifiable->getNotifiableType(); $notificationModel->data = $data; $notificationModel->save(); } return true; } }