/ Laravel

Set a Variable for use on the Laravel Registration Page

Sometimes when you are creating your registration workflow you may need to add extra information to the registration page.

I assume you've already ran php artisan make:auth in your Laravel project.

Open your /app/Http/Controllers/Auth/RegistrationController.php and insert the following method.

public function showRegistrationForm()
{
    $myVar = 'example string';
    
    return view('auth.register', ['myVar' => $myVar]);
}

Using this override method will allow you to set variables to be used on your registration view.

Set a Variable for use on the Laravel Registration Page
Share this

Subscribe to Dan Rovito