Reputation: 2993
is there the same eloquent function of each
on Code igniter?
same functionality of each of laravel?
example:
$collection = $collection->each(function ($item, $key) {
if (/* some condition */) {
return false;
}
});
Upvotes: 0
Views: 36
Reputation: 35180
No, I think the closest you're going to get with CI (out of the box) is Array helpers.
That being said, you could just install the Collections package with composer:
composer require illuminate/collections
If you need a version older than v8, you can use the Tighten version instead.
Upvotes: 1