Skip to content

henzeb/laravel-typed-collection

Repository files navigation

Laravel Typed Collection

Build Status Latest Version on Packagist Total Downloads License

PHP has no support for Generics. Yet sometimes, we want to be sure we receive an array of a certain type.

Using Laravel's Collections, we should be able to force types. This package allows you to.

Unlike many other packages, this one has support for Eloquent!

Installation

Just install with the following command.

composer require henzeb/laravel-typed-collection

usage

Testing this package

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email henzeberkheij@gmail.com instead of using the issue tracker.

Credits

License

The GNU AGPLv. Please see License File for more information.