tobymaxham/php-helpers

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

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: 2021-11-23 22:38:05 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

....