Answers for "laravel collection shift"

PHP
0

laravel collection shift

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

$collection->shift();

// 1

$collection->all();

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

Browse Popular Code Answers by Language