A set of useful Laravel collection macros
bitsnbolts/laravel-collection-macros is a Laravel package for a set of useful laravel collection macros.
It currently has 1 GitHub stars and 3.016 downloads on Packagist (latest version 3.0.0).
Install it with composer require bitsnbolts/laravel-collection-macros.
Discover more Laravel packages by bitsnbolts
or browse all Laravel packages to compare alternatives.
Last updated
This repository contains some useful collection macros.
You can install the package via composer:
composer require bitsnbolts/laravel-collection-macros
replaceInKeysDo a find and replace on all the keys of the collection.
$data = new Collection(['foo_bar' => 1]);
$data->replaceInKeys('_', ' '); // Collection(['foo bar' => 1])
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.