Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel collection pop

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

$collection->pop();

// 5

$collection->all();

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