Whats the difference between doing:
$model = User::newQuery();
$model->published(1);
$model->get();
And:
$model = new User;
$model = $model->published(1);
$model = $model->get();
I know with the second example you have to assign the call back to the model. But is there any difference to these?
Note, I'm not chaining as there would be some conditions between checking if it should be published or not etc.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire