Nosean's avatar

how can I pass variables to the register form?

how can I pass variables to the register form?

0 likes
3 replies
Nosean's avatar

hi, i know but i will pass a list of country to registerform. I cant find the controller to pass the variable per compact to view.

Cronix's avatar

All controllers related to auth are in /app/Http/Controllers/Auth. You're looking for the RegisterController. You'll see that controller is using a Trait called RegistersUsers. In that trait, you'll find a method called showRegistrationForm().

public function showRegistrationForm()
{
    return view('auth.register');
}

So what you'd do is copy that method into the RegisterController, and alter it how you need. It will then use yours instead of the default one in the trait.

Please or to participate in this conversation.