user(); return Inertia::render('users/Sessions', [ 'adminView' => false, 'user' => [ 'id' => $user->id, 'nameOrEmail' => $user->present()->nameOrEmail, ], 'sessions' => SessionPayload::collection( $this->sessions->getUserSessions($user->id), fn (string $sessionId) => route('profile.sessions.invalidate', $sessionId) ), ]); } public function destroy($session): RedirectResponse { $this->sessions->invalidateSession($session->id); return redirect()->route('profile.sessions') ->withSuccess(__('Session invalidated successfully.')); } }