fix the bugs & test
This commit is contained in:
parent
39c16fc9ce
commit
59f5e4d05f
@ -34,12 +34,12 @@ class LoginController extends Controller
|
||||
$verification = $response->json();
|
||||
|
||||
if (!isset($verification['success']) || $verification['success'] !== true) {
|
||||
return back()->withErrors(['error' => 'captcha is not correct']);
|
||||
return back()->withErrors(['error' => 'The captcha is incorrect.']);
|
||||
}
|
||||
|
||||
if (!Auth::attempt($credentials, $remember)) {
|
||||
return back()->withErrors([
|
||||
'email' => 'The provided credentials do not match our records.',
|
||||
'email' => 'These credentials do not match our records.',
|
||||
])->onlyInput('email');
|
||||
}
|
||||
|
||||
@ -58,11 +58,11 @@ class LoginController extends Controller
|
||||
'is_mobile' => $agent->isMobile()
|
||||
]);
|
||||
|
||||
return redirect()->route('dashboard')->with("success", "login successfully");
|
||||
return redirect()->route('dashboard')->with("success", "Logged in successfully.");
|
||||
} catch (\Exception $e) {
|
||||
return redirect()
|
||||
->route('login.create')
|
||||
->with('error', 'not login please try again' . $e->getMessage());
|
||||
->with('error', 'Login failed. Please try again. ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,11 +42,11 @@ class RegisterController extends Controller
|
||||
'is_mobile' => $agent->isMobile()
|
||||
]);
|
||||
|
||||
return redirect()->route('dashboard')->with('success', 'register successfully');
|
||||
return redirect()->route('dashboard')->with('success', 'Registered successfully.');
|
||||
} catch (\Exception $e) {
|
||||
return redirect()
|
||||
->route('register.create')
|
||||
->with('error', 'not register please try again' . $e->getMessage());
|
||||
->with('error', 'Registration failed. Please try again. ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="mt-4 flex justify-between items-center gap-4">
|
||||
<form action="#" method="GET" class="w-full">
|
||||
<form action="{{route('github.redirect')}}" method="GET" class="w-full">
|
||||
<button
|
||||
class="border border-[#e0e1dd] text-[#e0e1dd] w-full p-2 rounded-md font-medium cursor-pointer hover:opacity-85 transition duration-300 ease-in-out hover:bg-[#e0e1dd] hover:text-[#1b263b]">With
|
||||
Github</button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user