henzeb/laravel-typed-collection

Laravel typed collections

v1.11.0 2024-03-09 13:34 UTC

This package is auto-updated.

Last update: 2024-12-09 15:18:19 UTC


README

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.