I have 3 types of users Admin, Vendor, Customer in my laravel E-commerce.
Now I have to restrict routes for those vendors who are not approved by admin. Can someone please tell me the process, please?
here are the two tables users and shops.
users have those attributes
id, name, password, email, phone
and shops have
shop_name, address, shop_phone, owner_id (this is a foreign key of users.id), is_approved(bool)
- users hasOne shop relation are given here.
Now I need to know How can I restrict all auth routes who are not approved means is_approved==0
for shops.
Can Anyone please help me?