Yii - Related Active Record - Controller or Model method?

In the models you can set up the relation between the Station and the Store models in the relations function if you use Active Record. Obtaining the id of a Store is then possible using one short line of code (something like $storeId = $model->store->id;). So you can easily put this code into your controller and still keep the controller lean (Lean controllers, fat models).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions