vendredi 21 août 2015

Laravel 5 eloquent load model properties after create

When creating an eloquent model:

Model::create(['prop1' => 1, 'prop2' => 2]);

the returned model will only have prop1 & prop2 as properties, what can I do to eager load all others properties that I haven't inserted in database because they are optional ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Jve0LH
via IFTTT

Aucun commentaire:

Enregistrer un commentaire