Answers for "laravel collection pop"

PHP
0

laravel collection pop

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

$collection->pop();

// 5

$collection->all();

// [1, 2, 3, 4]
Posted by: Guest on July-24-2021

Browse Popular Code Answers by Language