user()->notifications()->where('id', $id)->first(); if ($notification){ $notification->delete(); return response()->json(['type' => 'success', 'message' => 'Marked Notification as Read', 'listid' => $request->listid]); } else { return response()->json(['type' => 'error', 'message' => 'Could not find the specified notification.']); } } }