jeudi 4 mai 2017

Why does not work except in collection Laravel?

I have the following code:

  $object = Object::with("prototypes.fields")->findOrFail($id)->get();

  $object_copied = $object->except(['id', 'prefix', 'prototypes']);

  dd($object_copied->all());

Last line returns collection with fields that should be except: 'id', 'prefix', 'prototypes'



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

Aucun commentaire:

Enregistrer un commentaire