Answer the question
In order to leave comments, you need to log in
Where should cookies and sessions be written in Yii2, in the model or in the controller?
Hello.
There is a model for authorization. It will set up the data in the cookie and session.
It is right?
After all, the model must receive data from the controller. If you take out the session processing in the controller, you get code duplication.
Since the controllers for authorization - outputs are different.
Answer the question
In order to leave comments, you need to log in
There is a model for authorization. It will set up the data in the cookie and session.
It is right?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question