add dd to troubleshoot email sending

This commit is contained in:
Kwesi Banson Jnr
2026-08-27 13:05:00 +00:00
parent e4926ea726
commit f3d79367df
2 changed files with 7 additions and 3 deletions

View File

@@ -66,7 +66,13 @@ class LoginController extends Controller
]); ]);
\Log::info($otp); \Log::info($otp);
Mail::to($staff->email)->send(new LoginOtpMail($otp)); // Mail::to($staff->email)->send(new LoginOtpMail($otp));
try {
Mail::to($staff->email)->send(new LoginOtpMail($otp));
} catch (\Exception $e) {
dd($e->getMessage());
}
session(['otp_staff_id' => $staff->id]); session(['otp_staff_id' => $staff->id]);

View File

@@ -35,8 +35,6 @@ class OtpController extends Controller
'otp_expires_at' => null 'otp_expires_at' => null
]); ]);
// Log the staff member in
// NOTE: If using a specific guard, use Auth::guard('staff')->login($staff);
Auth::login($staff); Auth::login($staff);
// Clear the temp session // Clear the temp session