Answer the question
In order to leave comments, you need to log in
How to correctly display additional functionality depending on whether the user is authorized in yii2?
Lyrical digression:
I’m just starting to make websites, and just recently I’ve moved away from stupid video courses, because I have to leave my comfort zone and start developing something myself, but there are many small questions, but I hope they will tell me, I came to what is better to look for solutions to minor problems than to generally say to myself that I don’t know how to do something.
I need to make a simple bulletin board in yii2.
The question itself:
1) Make a different menu
2) Opportunities to comment on the profile or lack thereof
And all this, depending on whether the user is authorized or not.
Is it easy for me through if, depending on whether the user is authorized, to add a form for sending a comment or not directly in the view?
If the user goes without authorization through the link which he himself enters in the browser available only for authorized, where in this case to check whether he is authorized, directly in the controller, or can it be written somewhere in the routing?
I hope you don't lash out at me for childish questions :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question