Support the ongoing development of Laravel.io →
Authentication
Last updated 1 year ago.
0

I realize now this is not a bug, but a feature not implemented. To re-populate the form modify postLogin() in AuthController.php to flash the input:

public function postLogin(LoginRequest $request)
{
	if ($this->auth->attempt($request->only('email', 'password')))
	{
		return redirect('/');
	}

	return redirect('/auth/login')
                     #Flash input
                     ->withInput(Input::except('password'))
                     ->withErrors([
		'email' => 'These credentials do not match our records.',
	]);
}

and use the old data in the view to set the value of the input:

{{ Form::email('email', old('email'), ['class' => 'form-control']) }}
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

omma2289 omma2289 Joined 18 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.