bitsnbolts/laravel-collection-macros
A set of useful Laravel collection macros
3,019
1
| Install | |
|---|---|
composer require bitsnbolts/laravel-collection-macros |
|
| Latest Version: | 3.0.0 |
| PHP: | ^7.1|^8.0|^8.1|^8.2|^8.3 |
| License: | MIT |
| Last Updated: | Dec 19, 2025 |
| Links: | GitHub · Packagist |
Maintainer: thijsvdanker
Laravel Collection Macros
This repository contains some useful collection macros.
Installation
You can install the package via composer:
composer require bitsnbolts/laravel-collection-macros
Usage
replaceInKeys
Do a find and replace on all the keys of the collection.
$data = new Collection(['foo_bar' => 1]);
$data->replaceInKeys('_', ' '); // Collection(['foo bar' => 1])
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
erirk/paypalpayment
laravel-paypalpayment is simple package help you process direct credit card paym...
0
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
628,058,007
9,707