For the application I am developing I have 3 roles
• Role 1
• Role 2
• Role 3
from the home page I have 3 links for user registration.
I thought about this approach:
• Link 1 -> Role 1 (Registration form with hidden input role_id)
• Link 2 -> Role 2 (Registration form with hidden input role_id)
• Link 3 -> Role 3 (Registration form with hidden input role_id)
Database
user
role
user_role
for the moment I have only set laravel / ui for authentication.
How can I pass the role value to the registration form via routes?
No, since your register endpoint is a GET route. You could create three different register endpoints (one for each role) instead. That would only be reasonable if you don't have more roles with dedicated registrations in the future tho, depending on the differences in the registration process of course.