Support the ongoing development of Laravel.io →
Security Forms Validation
Last updated 1 year ago.
0

Short: The controller sends it to the view.

Long: I assume you are using a freshly installed laravel project, which provides an authentication example out of the box. Now look at the AuthController (app/Http/Controllers/Auth), you will recognize that it uses a trait called AuthenticatesAndRegistersUsers where you'll find the following method:

public function postRegister(Request $request)
{
	$validator = $this->registrar->validator($request->all());

	if ($validator->fails())
	{
		$this->throwValidationException(
			$request, $validator
		);
	}

	$this->auth->login($this->registrar->create($request->all()));

	return redirect($this->redirectPath());
}

This is where all the 'magic' happens. I recommend to read the following documentations which will help you to understand this function:

Regards MightyM

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.