slug() !== $username) { abort(404); } if ($request->user()?->cannot('view', $user)) { abort(403); } return view('user.show', compact('user')); } }