diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php deleted file mode 100644 index b4a48d9..0000000 --- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php +++ /dev/null @@ -1,51 +0,0 @@ - Route::has('password.request'), - 'status' => $request->session()->get('status'), - ]); - } - - /** - * Handle an incoming authentication request. - */ - public function store(LoginRequest $request): RedirectResponse - { - $request->authenticate(); - - $request->session()->regenerate(); - - return redirect()->intended(route('dashboard', absolute: false)); - } - - /** - * Destroy an authenticated session. - */ - public function destroy(Request $request): RedirectResponse - { - Auth::guard('web')->logout(); - - $request->session()->invalidate(); - $request->session()->regenerateToken(); - - return redirect('/'); - } -} diff --git a/app/Http/Controllers/Auth/ConfirmablePasswordController.php b/app/Http/Controllers/Auth/ConfirmablePasswordController.php deleted file mode 100644 index c729706..0000000 --- a/app/Http/Controllers/Auth/ConfirmablePasswordController.php +++ /dev/null @@ -1,41 +0,0 @@ -validate([ - 'email' => $request->user()->email, - 'password' => $request->password, - ])) { - throw ValidationException::withMessages([ - 'password' => __('auth.password'), - ]); - } - - $request->session()->put('auth.password_confirmed_at', time()); - - return redirect()->intended(route('dashboard', absolute: false)); - } -} diff --git a/app/Http/Controllers/Auth/EmailVerificationNotificationController.php b/app/Http/Controllers/Auth/EmailVerificationNotificationController.php deleted file mode 100644 index f64fa9b..0000000 --- a/app/Http/Controllers/Auth/EmailVerificationNotificationController.php +++ /dev/null @@ -1,24 +0,0 @@ -user()->hasVerifiedEmail()) { - return redirect()->intended(route('dashboard', absolute: false)); - } - - $request->user()->sendEmailVerificationNotification(); - - return back()->with('status', 'verification-link-sent'); - } -} diff --git a/app/Http/Controllers/Auth/EmailVerificationPromptController.php b/app/Http/Controllers/Auth/EmailVerificationPromptController.php deleted file mode 100644 index 672f7cf..0000000 --- a/app/Http/Controllers/Auth/EmailVerificationPromptController.php +++ /dev/null @@ -1,22 +0,0 @@ -user()->hasVerifiedEmail() - ? redirect()->intended(route('dashboard', absolute: false)) - : Inertia::render('auth/verify-email', ['status' => $request->session()->get('status')]); - } -} diff --git a/app/Http/Controllers/Auth/NewPasswordController.php b/app/Http/Controllers/Auth/NewPasswordController.php deleted file mode 100644 index 6ab99ef..0000000 --- a/app/Http/Controllers/Auth/NewPasswordController.php +++ /dev/null @@ -1,70 +0,0 @@ - $request->email, - 'token' => $request->route('token'), - ]); - } - - /** - * Handle an incoming new password request. - * - * @throws ValidationException - */ - public function store(Request $request): RedirectResponse - { - $request->validate([ - 'token' => 'required', - 'email' => 'required|email', - 'password' => ['required', 'confirmed', Rules\Password::defaults()], - ]); - - // Here we will attempt to reset the user's password. If it is successful we - // will update the password on an actual user model and persist it to the - // database. Otherwise we will parse the error and return the response. - $status = Password::reset( - $request->only('email', 'password', 'password_confirmation', 'token'), - function (User $user) use ($request) { - $user->forceFill([ - 'password' => Hash::make($request->password), - 'remember_token' => Str::random(60), - ])->save(); - - event(new PasswordReset($user)); - } - ); - - // If the password was successfully reset, we will redirect the user back to - // the application's home authenticated view. If there is an error we can - // redirect them back to where they came from with their error message. - if ($status == Password::PasswordReset) { - return to_route('login')->with('status', __($status)); - } - - throw ValidationException::withMessages([ - 'email' => [__($status)], - ]); - } -} diff --git a/app/Http/Controllers/Auth/PasswordResetLinkController.php b/app/Http/Controllers/Auth/PasswordResetLinkController.php deleted file mode 100644 index 74d46f9..0000000 --- a/app/Http/Controllers/Auth/PasswordResetLinkController.php +++ /dev/null @@ -1,42 +0,0 @@ - $request->session()->get('status'), - ]); - } - - /** - * Handle an incoming password reset link request. - * - * @throws ValidationException - */ - public function store(Request $request): RedirectResponse - { - $request->validate([ - 'email' => 'required|email', - ]); - - Password::sendResetLink( - $request->only('email') - ); - - return back()->with('status', __('A reset link will be sent if the account exists.')); - } -} diff --git a/app/Http/Controllers/Auth/VerifyEmailController.php b/app/Http/Controllers/Auth/VerifyEmailController.php deleted file mode 100644 index bfeef5a..0000000 --- a/app/Http/Controllers/Auth/VerifyEmailController.php +++ /dev/null @@ -1,31 +0,0 @@ -user()->hasVerifiedEmail()) { - return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); - } - - if ($request->user()->markEmailAsVerified()) { - /** @var MustVerifyEmail $user */ - $user = $request->user(); - - event(new Verified($user)); - } - - return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); - } -} diff --git a/app/Http/Controllers/Settings/PasswordController.php b/app/Http/Controllers/Settings/PasswordController.php deleted file mode 100644 index f8d19b9..0000000 --- a/app/Http/Controllers/Settings/PasswordController.php +++ /dev/null @@ -1,39 +0,0 @@ -validate([ - 'current_password' => ['required', 'current_password'], - 'password' => ['required', Password::defaults(), 'confirmed'], - ]); - - $request->user()->update([ - 'password' => Hash::make($validated['password']), - ]); - - return back(); - } -} diff --git a/app/Http/Controllers/Settings/ProfileController.php b/app/Http/Controllers/Settings/ProfileController.php deleted file mode 100644 index a6cb7e1..0000000 --- a/app/Http/Controllers/Settings/ProfileController.php +++ /dev/null @@ -1,63 +0,0 @@ - $request->user() instanceof MustVerifyEmail, - 'status' => $request->session()->get('status'), - ]); - } - - /** - * Update the user's profile settings. - */ - public function update(ProfileUpdateRequest $request): RedirectResponse - { - $request->user()->fill($request->validated()); - - if ($request->user()->isDirty('email')) { - $request->user()->email_verified_at = null; - } - - $request->user()->save(); - - return to_route('profile.edit'); - } - - /** - * Delete the user's account. - */ - public function destroy(Request $request): RedirectResponse - { - $request->validate([ - 'password' => ['required', 'current_password'], - ]); - - $user = $request->user(); - - Auth::logout(); - - $user->delete(); - - $request->session()->invalidate(); - $request->session()->regenerateToken(); - - return redirect('/'); - } -} diff --git a/resources/js/components/Settings/AppearanceDropdown.tsx b/resources/js/components/Settings/AppearanceDropdown.tsx deleted file mode 100644 index ee5032f..0000000 --- a/resources/js/components/Settings/AppearanceDropdown.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { Button } from '@/components/ui/button'; -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/DropdownMenu'; -import { useAppearance } from '@/hooks/use-appearance'; -import { Monitor, Moon, Sun } from 'lucide-react'; -import { HTMLAttributes } from 'react'; - -export default function AppearanceToggleDropdown({ className = '', ...props }: HTMLAttributes) { - const { appearance, updateAppearance } = useAppearance(); - - const getCurrentIcon = () => { - switch (appearance) { - case 'dark': - return ; - case 'light': - return ; - default: - return ; - } - }; - - return ( -
- - - - - - updateAppearance('light')}> - - - Light - - - updateAppearance('dark')}> - - - Dark - - - updateAppearance('system')}> - - - System - - - - -
- ); -} diff --git a/resources/js/components/Settings/AppearanceTabs.tsx b/resources/js/components/Settings/AppearanceTabs.tsx deleted file mode 100644 index 900b0f2..0000000 --- a/resources/js/components/Settings/AppearanceTabs.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Appearance, useAppearance } from '@/hooks/use-appearance'; -import { cn } from '@/lib/utils'; -import { LucideIcon, Monitor, Moon, Sun } from 'lucide-react'; -import { HTMLAttributes } from 'react'; - -export default function AppearanceToggleTab({ className = '', ...props }: HTMLAttributes) { - const { appearance, updateAppearance } = useAppearance(); - - const tabs: { value: Appearance; icon: LucideIcon; label: string }[] = [ - { value: 'light', icon: Sun, label: 'Light' }, - { value: 'dark', icon: Moon, label: 'Dark' }, - { value: 'system', icon: Monitor, label: 'System' }, - ]; - - return ( -
- {tabs.map(({ value, icon: Icon, label }) => ( - - ))} -
- ); -} diff --git a/resources/js/layouts/settings/layout.tsx b/resources/js/layouts/settings/layout.tsx deleted file mode 100644 index 47859cd..0000000 --- a/resources/js/layouts/settings/layout.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import Heading from '@/components/heading'; -import { Button } from '@/components/ui/button'; -import { Separator } from '@/components/ui/separator'; -import { cn } from '@/lib/utils'; -import { type NavItem } from '@/types'; -import { Link } from '@inertiajs/react'; -import { type PropsWithChildren } from 'react'; - -const sidebarNavItems: NavItem[] = [ - { - title: 'Profile', - href: '/settings/profile', - icon: null, - }, - { - title: 'Password', - href: '/settings/password', - icon: null, - }, - { - title: 'Appearance', - href: '/settings/appearance', - icon: null, - }, -]; - -export default function SettingsLayout({ children }: PropsWithChildren) { - // When server-side rendering, we only render the layout on the client... - if (typeof window === 'undefined') { - return null; - } - - const currentPath = window.location.pathname; - - return ( -
- - -
- - - - -
-
{children}
-
-
-
- ); -} diff --git a/resources/js/pages/auth/confirm-password.tsx b/resources/js/pages/auth/confirm-password.tsx deleted file mode 100644 index 50907b9..0000000 --- a/resources/js/pages/auth/confirm-password.tsx +++ /dev/null @@ -1,60 +0,0 @@ -// Components -import { Head, useForm } from '@inertiajs/react'; -import { LoaderCircle } from 'lucide-react'; -import { FormEventHandler } from 'react'; - -import InputError from '@/components/InputError'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import AuthLayout from '@/layouts/auth-layout'; - -export default function ConfirmPassword() { - const { data, setData, post, processing, errors, reset } = useForm>({ - password: '', - }); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - - post(route('password.confirm'), { - onFinish: () => reset('password'), - }); - }; - - return ( - - - -
-
-
- - setData('password', e.target.value)} - /> - - -
- -
- -
-
-
-
- ); -} diff --git a/resources/js/pages/auth/forgot-password.tsx b/resources/js/pages/auth/forgot-password.tsx deleted file mode 100644 index a69c3bc..0000000 --- a/resources/js/pages/auth/forgot-password.tsx +++ /dev/null @@ -1,63 +0,0 @@ -// Components -import { Head, useForm } from '@inertiajs/react'; -import { LoaderCircle } from 'lucide-react'; -import { FormEventHandler } from 'react'; - -import InputError from '@/components/InputError'; -import TextLink from '@/components/TextLink'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import AuthLayout from '@/layouts/auth-layout'; - -export default function ForgotPassword({ status }: { status?: string }) { - const { data, setData, post, processing, errors } = useForm>({ - email: '', - }); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - - post(route('password.email')); - }; - - return ( - - - - {status &&
{status}
} - -
-
-
- - setData('email', e.target.value)} - placeholder="email@example.com" - /> - - -
- -
- -
-
- -
- Or, return to - log in -
-
-
- ); -} diff --git a/resources/js/pages/auth/login.tsx b/resources/js/pages/auth/login.tsx deleted file mode 100644 index 8df7bfd..0000000 --- a/resources/js/pages/auth/login.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { Head, useForm } from '@inertiajs/react'; -import { LoaderCircle } from 'lucide-react'; -import { FormEventHandler } from 'react'; - -import InputError from '@/components/InputError'; -import TextLink from '@/components/TextLink'; -import { Button } from '@/components/ui/button'; -import { Checkbox } from '@/components/ui/checkbox'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import AuthLayout from '@/layouts/auth-layout'; - -type LoginForm = { - email: string; - password: string; - remember: boolean; -}; - -interface LoginProps { - status?: string; - canResetPassword: boolean; -} - -export default function Login({ status, canResetPassword }: LoginProps) { - const { data, setData, post, processing, errors, reset } = useForm>({ - email: '', - password: '', - remember: false, - }); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - post(route('login'), { - onFinish: () => reset('password'), - }); - }; - - return ( - - - -
-
-
- - setData('email', e.target.value)} - placeholder="email@example.com" - /> - -
- -
-
- - {canResetPassword && ( - - Forgot password? - - )} -
- setData('password', e.target.value)} - placeholder="Password" - /> - -
- -
- setData('remember', !data.remember)} - tabIndex={3} - /> - -
- - -
- -
- Don't have an account?{' '} - - Sign up - -
-
- - {status &&
{status}
} -
- ); -} diff --git a/resources/js/pages/auth/register.tsx b/resources/js/pages/auth/register.tsx deleted file mode 100644 index 35091ba..0000000 --- a/resources/js/pages/auth/register.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import { Head, useForm } from '@inertiajs/react'; -import { LoaderCircle } from 'lucide-react'; -import { FormEventHandler } from 'react'; - -import InputError from '@/components/InputError'; -import TextLink from '@/components/TextLink'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import AuthLayout from '@/layouts/auth-layout'; - -type RegisterForm = { - name: string; - email: string; - password: string; - password_confirmation: string; -}; - -export default function Register() { - const { data, setData, post, processing, errors, reset } = useForm>({ - name: '', - email: '', - password: '', - password_confirmation: '', - }); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - post(route('register'), { - onFinish: () => reset('password', 'password_confirmation'), - }); - }; - - return ( - - -
-
-
- - setData('name', e.target.value)} - disabled={processing} - placeholder="Full name" - /> - -
- -
- - setData('email', e.target.value)} - disabled={processing} - placeholder="email@example.com" - /> - -
- -
- - setData('password', e.target.value)} - disabled={processing} - placeholder="Password" - /> - -
- -
- - setData('password_confirmation', e.target.value)} - disabled={processing} - placeholder="Confirm password" - /> - -
- - -
- -
- Already have an account?{' '} - - Log in - -
-
-
- ); -} diff --git a/resources/js/pages/auth/reset-password.tsx b/resources/js/pages/auth/reset-password.tsx deleted file mode 100644 index 816b11d..0000000 --- a/resources/js/pages/auth/reset-password.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import { Head, useForm } from '@inertiajs/react'; -import { LoaderCircle } from 'lucide-react'; -import { FormEventHandler } from 'react'; - -import InputError from '@/components/InputError'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import AuthLayout from '@/layouts/auth-layout'; - -interface ResetPasswordProps { - token: string; - email: string; -} - -type ResetPasswordForm = { - token: string; - email: string; - password: string; - password_confirmation: string; -}; - -export default function ResetPassword({ token, email }: ResetPasswordProps) { - const { data, setData, post, processing, errors, reset } = useForm>({ - token: token, - email: email, - password: '', - password_confirmation: '', - }); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - post(route('password.store'), { - onFinish: () => reset('password', 'password_confirmation'), - }); - }; - - return ( - - - -
-
-
- - setData('email', e.target.value)} - /> - -
- -
- - setData('password', e.target.value)} - placeholder="Password" - /> - -
- -
- - setData('password_confirmation', e.target.value)} - placeholder="Confirm password" - /> - -
- - -
-
-
- ); -} diff --git a/resources/js/pages/auth/verify-email.tsx b/resources/js/pages/auth/verify-email.tsx deleted file mode 100644 index ec9a5ce..0000000 --- a/resources/js/pages/auth/verify-email.tsx +++ /dev/null @@ -1,41 +0,0 @@ -// Components -import { Head, useForm } from '@inertiajs/react'; -import { LoaderCircle } from 'lucide-react'; -import { FormEventHandler } from 'react'; - -import TextLink from '@/components/TextLink'; -import { Button } from '@/components/ui/button'; -import AuthLayout from '@/layouts/auth-layout'; - -export default function VerifyEmail({ status }: { status?: string }) { - const { post, processing } = useForm({}); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - - post(route('verification.send')); - }; - - return ( - - - - {status === 'verification-link-sent' && ( -
- A new verification link has been sent to the email address you provided during registration. -
- )} - -
- - - - Log out - -
-
- ); -} diff --git a/resources/js/pages/settings/appearance.tsx b/resources/js/pages/settings/appearance.tsx deleted file mode 100644 index 94ab15a..0000000 --- a/resources/js/pages/settings/appearance.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Head } from '@inertiajs/react'; - -import AppearanceTabs from '@/components/Settings/AppearanceTabs'; -import HeadingSmall from '@/components/HeadingSmall'; -import { type BreadcrumbItem } from '@/types'; - -import AppLayout from '@/layouts/app-layout'; -import SettingsLayout from '@/layouts/settings/layout'; - -const breadcrumbs: BreadcrumbItem[] = [ - { - title: 'Appearance settings', - href: '/settings/appearance', - }, -]; - -export default function Appearance() { - return ( - - - - -
- - -
-
-
- ); -} diff --git a/resources/js/pages/settings/password.tsx b/resources/js/pages/settings/password.tsx deleted file mode 100644 index 4d16221..0000000 --- a/resources/js/pages/settings/password.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import InputError from '@/components/InputError'; -import AppLayout from '@/layouts/app-layout'; -import SettingsLayout from '@/layouts/settings/layout'; -import { type BreadcrumbItem } from '@/types'; -import { Transition } from '@headlessui/react'; -import { Head, useForm } from '@inertiajs/react'; -import { FormEventHandler, useRef } from 'react'; - -import HeadingSmall from '@/components/HeadingSmall'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; - -const breadcrumbs: BreadcrumbItem[] = [ - { - title: 'Password settings', - href: '/settings/password', - }, -]; - -export default function Password() { - const passwordInput = useRef(null); - const currentPasswordInput = useRef(null); - - const { data, setData, errors, put, reset, processing, recentlySuccessful } = useForm({ - current_password: '', - password: '', - password_confirmation: '', - }); - - const updatePassword: FormEventHandler = (e) => { - e.preventDefault(); - - put(route('password.update'), { - preserveScroll: true, - onSuccess: () => reset(), - onError: (errors) => { - if (errors.password) { - reset('password', 'password_confirmation'); - passwordInput.current?.focus(); - } - - if (errors.current_password) { - reset('current_password'); - currentPasswordInput.current?.focus(); - } - }, - }); - }; - - return ( - - - - -
- - -
-
- - - setData('current_password', e.target.value)} - type="password" - className="mt-1 block w-full" - autoComplete="current-password" - placeholder="Current password" - /> - - -
- -
- - - setData('password', e.target.value)} - type="password" - className="mt-1 block w-full" - autoComplete="new-password" - placeholder="New password" - /> - - -
- -
- - - setData('password_confirmation', e.target.value)} - type="password" - className="mt-1 block w-full" - autoComplete="new-password" - placeholder="Confirm password" - /> - - -
- -
- - - -

Saved

-
-
-
-
-
-
- ); -} diff --git a/resources/js/pages/settings/profile.tsx b/resources/js/pages/settings/profile.tsx deleted file mode 100644 index 25b56be..0000000 --- a/resources/js/pages/settings/profile.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import { type BreadcrumbItem, type SharedData } from '@/types'; -import { Transition } from '@headlessui/react'; -import { Head, Link, useForm, usePage } from '@inertiajs/react'; -import { FormEventHandler } from 'react'; - -import DeleteUser from '@/components/Settings/DeleteUser'; -import HeadingSmall from '@/components/HeadingSmall'; -import InputError from '@/components/InputError'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import AppLayout from '@/layouts/app-layout'; -import SettingsLayout from '@/layouts/settings/layout'; - -const breadcrumbs: BreadcrumbItem[] = [ - { - title: 'Profile settings', - href: '/settings/profile', - }, -]; - -type ProfileForm = { - name: string; - email: string; -}; - -export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail: boolean; status?: string }) { - const { auth } = usePage().props; - - const { data, setData, patch, errors, processing, recentlySuccessful } = useForm>({ - name: auth.user.name, - email: auth.user.email, - }); - - const submit: FormEventHandler = (e) => { - e.preventDefault(); - - patch(route('profile.update'), { - preserveScroll: true, - }); - }; - - return ( - - - - -
- - -
-
- - - setData('name', e.target.value)} - required - autoComplete="name" - placeholder="Full name" - /> - - -
- -
- - - setData('email', e.target.value)} - required - autoComplete="username" - placeholder="Email address" - /> - - -
- - {mustVerifyEmail && auth.user.email_verified_at === null && ( -
-

- Your email address is unverified.{' '} - - Click here to resend the verification email. - -

- - {status === 'verification-link-sent' && ( -
- A new verification link has been sent to your email address. -
- )} -
- )} - -
- - - -

Saved

-
-
-
-
- - -
-
- ); -} diff --git a/routes/auth.php b/routes/auth.php index 7862ed4..7a13564 100644 --- a/routes/auth.php +++ b/routes/auth.php @@ -1,56 +1,8 @@ group(function () { - Route::get('register', [RegisteredUserController::class, 'create']) - ->name('register'); - - Route::post('register', [RegisteredUserController::class, 'store']); - - Route::get('login', [AuthenticatedSessionController::class, 'create']) - ->name('login'); - - Route::post('login', [AuthenticatedSessionController::class, 'store']); - - Route::get('forgot-password', [PasswordResetLinkController::class, 'create']) - ->name('password.request'); - - Route::post('forgot-password', [PasswordResetLinkController::class, 'store']) - ->name('password.email'); - - Route::get('reset-password/{token}', [NewPasswordController::class, 'create']) - ->name('password.reset'); - - Route::post('reset-password', [NewPasswordController::class, 'store']) - ->name('password.store'); -}); - -Route::middleware('auth')->group(function () { - Route::get('verify-email', EmailVerificationPromptController::class) - ->name('verification.notice'); - - Route::get('verify-email/{id}/{hash}', VerifyEmailController::class) - ->middleware(['signed', 'throttle:6,1']) - ->name('verification.verify'); - - Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store']) - ->middleware('throttle:6,1') - ->name('verification.send'); - - Route::get('confirm-password', [ConfirmablePasswordController::class, 'show']) - ->name('password.confirm'); - - Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']); - - Route::post('logout', [AuthenticatedSessionController::class, 'destroy']) - ->name('logout'); -}); +// First-run setup only — gated by User::exists() in the controller +Route::get('register', [RegisteredUserController::class, 'create'])->name('register'); +Route::post('register', [RegisteredUserController::class, 'store']); diff --git a/routes/settings.php b/routes/settings.php deleted file mode 100644 index c2e790a..0000000 --- a/routes/settings.php +++ /dev/null @@ -1,21 +0,0 @@ -group(function () { - Route::redirect('settings', '/settings/profile'); - - Route::get('settings/profile', [ProfileController::class, 'edit'])->name('profile.edit'); - Route::patch('settings/profile', [ProfileController::class, 'update'])->name('profile.update'); - Route::delete('settings/profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); - - Route::get('settings/password', [PasswordController::class, 'edit'])->name('password.edit'); - Route::put('settings/password', [PasswordController::class, 'update'])->name('password.update'); - - Route::get('settings/appearance', function () { - return Inertia::render('settings/appearance'); - })->name('appearance'); -}); diff --git a/routes/web.php b/routes/web.php index 1ea1f94..0704ec7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -47,5 +47,4 @@ Route::post('/', [MilestoneController::class, 'store'])->name('store'); }); -require __DIR__.'/settings.php'; require __DIR__.'/auth.php'; diff --git a/testing b/testing new file mode 100644 index 0000000..fce68f7 Binary files /dev/null and b/testing differ