Answers for "laravel array map"

PHP
0

laravel map array

collect($deliver_addresses)->map(function ($address) use ($input) {

    $address['id']              = $input['id'];
    $address['a_new_attribute'] = $input['a_new_attribute'];

    return $address;

});
Posted by: Guest on September-27-2021

Browse Popular Code Answers by Language