mercredi 20 juin 2018

query builder convert the result of query builder to model object

can i convert collection that returned from query builder to object model for example this

 $collection = DB::table('post')->get();
        (App\post)$collection->first;

if no tell me another way to get all post from data base and get all comment to post isolated`enter code here



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2yrbg30
via IFTTT

Aucun commentaire:

Enregistrer un commentaire