Answer the question
In order to leave comments, you need to log in
Is it correct to pass Models to View?
Hi all.
In yii2, the data is transferred as follows. way.
The controller "pulls" the Model(s) and passes the data to the View. Is it correct?
After all, the Controller should not know about the implementation of the View (and we pass an array containing this data one way or another)
I pass the Model to the View + the data that came to the Controller, and the View itself "pulls" the Model.
How true? [ 'productList' => [], 'title' => '', ...]
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