Hi, I have student and teacher registration page and I am using laravel ui package for getting login/registration. I my web.php I have routes like below as default
domain.com/register?user=teacher will show teacher register form
domain.com/register?user=student will show student register form
How can i do this laravel. Any help? Thanks
@Sinnbeck
I want to have two different routes
domain.com/register?user=teacher and domain.com/register?user=student
They will have same method but based on get parameter i will redirect the user. How can I modify the existing register route.
Thanks
@david001 Those are the same route. Laravel has no way of telling the difference in the router. So you need to add that method to the register controller, and override the view in there
public function showRegistrationForm(Request $request)
{
if ($request->input('teacher')) {
return view('auth.register-teacher');
}
return view('auth.register-student');
}