Collection Laravel en dernier
collect([1, 2, 3, 4])->last(function ($value, $key) {
return $value < 3;
});
// 2
Cooperative Crab
collect([1, 2, 3, 4])->last(function ($value, $key) {
return $value < 3;
});
// 2