tobymaxham/php-helpers

A PHP packages provided with many helper functions and classes

dev-master 2017-06-28 23:31 UTC

This package is auto-updated.

Last update: 2024-04-24 04:05:53 UTC


README

A PHP packages provided with many helper functions and classes. I use this in many projects.

Installation

composer require tobymaxham/php-helpers

Usage

Functions

collect

$collection = collect(['Freddy', 'Teddy', 'Eddy']);

$collection->first(); // Freddy
$collection->last(); // Eddy

foreach ($collection as $key => $value) {
    echo $key . ' => ' . $value;
}

// 0 => Freddy
// 1 => Teddy
// 2 => Eddy

Classes

....