notifications()->create([ 'message' => $notification->getMessage(), 'data' => $notification->toArray() ]); return true; } catch (\Exception $e) { Flash::setMessage("error", $e->getMessage()); return false; } } }