dimanche 3 juin 2018

How to remove an array within the protected array?

My data returns look like:

Illuminate\Support\Collection Object
(
    [items:protected] => Array
        (
            [admin] => Admin
            [user] => User
            [abcd] => Abcd
        )

)

I want to remove admin array in above result. I tried this way unset($data->items->admin) Getting the error message Property [items] does not exist on this collection instance..



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire