Lead::find()
->select(['now() AS prop1'])
->all();
I want my model Lead to get prop1 by default even though I call
Lead::find()->all();
I was thinking about event beforeFind.
How can I do this trick?
Lead::find()
->select(['now() AS prop1'])
->all();
I want my model Lead to get prop1 by default even though I call
Lead::find()->all();
I was thinking about event beforeFind.
How can I do this trick?
use Query Builder
I have to work with AR model. But also I need to get an extra field, for example DBexpresion NOW() . Is that possible to make this tip now?
p.s. I used to do this tip in Yii 1