3 years ago

Multiple registration form requests

Posted 3 years ago by zainbutt

I am working on an Laravel 5.3 application where there are different types of users (Roles), and all of them needs to have different signup form because they have different details, right now i have a users table that is handling basic data details that are common for all user types, so i have decided to make some more tables (Company, Donor) that would be linked to users table (Foreign Key).. So the confusion i am having is how should i have multiple or dynamic form requests for all of them in register method of RegisterController based on their role ..

public function register(CreateUserRequest Or CreateCompanyRequest  $request)
        //email verification


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

Please sign in or create an account to participate in this conversation.