lundi 30 juillet 2018

How to add / remove elements from array that is in Request

My request looks like this

Array
(
  [name] => Eugene A
  [address] => Array
    (
        [billing] => Array
            (
                [address] => aaa
            )
        [shipping] => Array
            (
                [address] => bbb
            )
    )
)

I need to delete the shipping address. But how?

I can only delete both addresses,

$request->request->remove('address');

but I don't want it.

I want to delete only shipping address, like so

$request->request->remove('address.shipping');

But it is not working for me

Laravel 5.6



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

Aucun commentaire:

Enregistrer un commentaire