Answer the question
In order to leave comments, you need to log in
How to control display of label on NavBar widget?
I'm making a training blog in yii2!
I have a "My Blog" tab:
It shows up all the time even when no one is logged in - that's not right!
How can I make this NavBar tab appear only if there is a logged in user on the page ?
Answer the question
In order to leave comments, you need to log in
check if authorization is present - display the button. if the guest is not.
There is a lot of information about this on google.
Create 2 lists if authorized then the list is like this, if the list is not authorized otherwise.
Yii::$app->user->isGuest
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question