Requirements
Before installing Laravel List, ensure your environment meets these requirements:PHP Version
PHP 8.3 or higher is required for type hints and modern language features.
Laravel Version
Laravel 11.x or 12.x is supported. Works with both versions seamlessly.
Installation via Composer
Install the package
Run the following command in your Laravel project root:This will install the package and its dependencies.
Verify installation
Check that the package is installed correctly:You should see the package details and version information.
That’s It!
Unlike many Laravel packages, Laravel List requires no configuration, no migrations, and no service provider registration. It works out of the box.Laravel List is a simple, focused package that provides a single class:
ListCollection. There are no config files to publish, no migrations to run, and no views to customize.What Gets Installed
When you install Laravel List, you get:- ListCollection class: The main collection wrapper in the
dhy\LaravelListnamespace - Full type support: Complete PHPStan type annotations for IDE autocompletion
- Laravel integration: Seamless integration with Laravel’s collection ecosystem
Dependencies
Laravel List has minimal dependencies:Upgrading
To upgrade to the latest version of Laravel List:Compatibility Matrix
| Laravel List | PHP Version | Laravel Version |
|---|---|---|
| 1.x | 8.3+ | 11.x, 12.x |
Troubleshooting
PHP version too low
PHP version too low
If you see an error about PHP version requirements:Solution: Upgrade to PHP 8.3 or higher. Laravel List uses modern PHP features like typed properties and union types that require PHP 8.3+.
Laravel version incompatible
Laravel version incompatible
If you see dependency conflicts with Laravel:Solution: Ensure you’re using Laravel 11.x or 12.x. Earlier versions are not supported.
Composer memory limit
Composer memory limit
If Composer runs out of memory during installation:Solution: Increase PHP’s memory limit temporarily:
Next Steps
Quickstart Guide
Now that you’ve installed Laravel List, follow the quickstart guide to learn the basics and create your first ListCollection.