notifications()->paginate(); return view('notifications.index')->with([ 'notifications' => $notifications ]); } /** Display the specified resource. */ public function show(string $id) { $notification = Auth::user()->notifications()->findOrFail($id); $notification->markAsRead(); return view('notifications.show')->with([ 'notification' => $notification ]); } }