Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection pull

$collection = collect(['product_id' => 'prod-100', 'name' => 'Desk']);

$collection->pull('name');

// 'Desk'

$collection->all();

// ['product_id' => 'prod-100']
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #pull
ADD COMMENT
Topic
Name
8+1 =