i'm using laravel 5.6 vuejs2 spa and i have added user_type to the users table as i have 4 types of users in my applications
1.Normal Users (user_type = 0)
2.Admins (user_type = 1)
3.Professionals (user_type = 2)
4.Businesses (user_type = 3)
On the login form i have added a dropdown where user can select user_type and i have hidden the admin selection. This is working fine where user_type is saved in the database according to the user selection.
Now on the dashboard, i want to do something like if user is admin show these and if user is normaluser show these and so on. Also few routes which can be accessible only for a user_type like admin.
This is the first time im working with vuejs2. How to do the same in Vuejs2. Once i achieve this, i would like to add another column to users table i.e, is_premium and my second question is how to do something like
If user is professional and premium show this section
elseif user is professional and not premium show this section
else show this section
I'm not adding any laravel code as i used the same that came with installation, just added a column to database and would like to start on vuejs2
Any example or resource would help me get started
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire