I have 2 tables. users and dashboard_users , i want both to login through the same page, but the dashboard will have a random generated password to login so they can change it later, i have a page for login and i want both users and dashboard_users to login through the same page, how do i do it? Now when i try to login as a dashboardUser in inspect and network section, it gives me 302 error when i press login and nothing happens.
#Nothing happens when i press on login
24 messages · Page 1 of 1 (latest)
Stop using multiple guards, use roles, https://martinbean.dev/blog/2021/07/29/simple-role-based-authentication-laravel/
Need multiple user types in your Laravel application? Use roles instead of multiple user tables.
I do have roles
but i cant even login in the first place as dashboard_user
but it works perfectly fine as normal user
if you have roles then what is the point in you having different guards??
get rid of the guards, just use one guard for everything and your headaches will be no more
Why do they need a different password for the dashboard to begin with, it's overcomplication
If you want to do invites with random passwords, then just make a normal user account with a random password, there's no need for the added complication
I want some people to have access for dashboard
and they are different from other users
i thought if i do it this way it would be easier
no, you just have to check the users role instead...