From 2b284031941a201c25a0bddbd7309205233dbbba Mon Sep 17 00:00:00 2001 From: Adamalfantino <158027358+Adamalfantino@users.noreply.github.com> Date: Sat, 23 May 2026 00:49:11 +0700 Subject: [PATCH] fix: register ke login --- routes/web.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/routes/web.php b/routes/web.php index 93ce597..fcd7bd4 100644 --- a/routes/web.php +++ b/routes/web.php @@ -36,15 +36,13 @@ 'password.confirmed' => 'Konfirmasi password tidak cocok.', ]); - $user = \App\Models\User::create([ + \App\Models\User::create([ 'name' => $request->name, 'email' => $request->email, 'password' => $request->password, ]); - \Illuminate\Support\Facades\Auth::login($user); - - return redirect()->route('dashboard')->with('success', 'Akun berhasil dibuat! Selamat datang, ' . $user->name . '.'); + return redirect()->route('login')->with('success', 'Akun berhasil dibuat! Silakan login dengan akun Anda.'); })->name('register.process'); // Route untuk proses login