Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel artisan helper function

use IlluminateSupportArr;
 
$array = Arr::add(['name' => 'Desk'], 'price', 100);
 
// ['name' => 'Desk', 'price' => 100]
 
$array = Arr::add(['name' => 'Desk', 'price' => null], 'price', 100);
 
// ['name' => 'Desk', 'price' => 100]
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #artisan #helper #function
ADD COMMENT
Topic
Name
2+3 =