PHP code example of bitsnbolts / laravel-collection-macros
1. Go to this page and download the library: Download bitsnbolts/laravel-collection-macros library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bitsnbolts / laravel-collection-macros example snippets
$data = new Collection(['foo_bar' => 1]);
$data->replaceInKeys('_', ' '); // Collection(['foo bar' => 1])