Login is failed, the credencials email and password, is correct, but laravel dont acces to dashboard
The password reset is worng to, the email is correct and i try chance of credentials on myphpadmin but dont entry.
this is my code
<?php
namespace AppHttpControllersAuth;
use AppHttpControllersController;
use AppHttpRequestsAuthLoginRequest;
use AppProvidersRouteServiceProvider;
use IlluminateHttpRequest;
use IlluminateSupportFacadesAuth;
class AuthenticatedSessionController extends Controller
{
/**
* Display the login view.
*
* @return IlluminateViewView
*/
public function create()
{
return view('auth.login');
}
/**
* Handle an incoming authentication request.
*
* @param AppHttpRequestsAuthLoginRequest $request
* @return IlluminateHttpRedirectResponse
*/
public function store(LoginRequest $request)
{
$request->authenticate();
$request->session()->regenerate();
return redirect()->intended(RouteServiceProvider::HOME);
}
/**
* Destroy an authenticated session.
*
* @param IlluminateHttpRequest $request
* @return IlluminateHttpRedirectResponse
*/
public function destroy(Request $request)
{
Auth::guard('web')->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return redirect('/');
}
}
2
Answers
If you’re mass assignment while attempting authentication make sure the form requested keys must same as Model’s $fillable keys.
then try this:
if you’re working with multi guards, try this:
I have tested this example code from your and my implementation
Please check from your project and check flash messages if password was wrong check password hashing correctly