Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection shift

$collection = collect([1, 2, 3, 4, 5]);

$collection->shift();

// 1

$collection->all();

// [2, 3, 4, 5]
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #collection #shift
ADD COMMENT
Topic
Name
3+1 =