Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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;

});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #map #array
ADD COMMENT
Topic
Name
8+3 =