Looking to hire Laravel developers? Try LaraJobs

laravel-typed-collection maintained by henzeb

Description
Laravel typed collections
Last update
2025/06/07 16:36 (dev-master)
License
Downloads
1 383

Comments
comments powered by Disqus

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.