Download the PHP package outerweb/enum-helpers without Composer
On this page you can find all versions of the php package outerweb/enum-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download outerweb/enum-helpers
More information about outerweb/enum-helpers
Files in outerweb/enum-helpers
Package enum-helpers
Short Description Traits to make working with Enums a breeze in Laravel.
License MIT
Homepage https://github.com/outer-web/enum-helpers
Informations about the package enum-helpers
Enum helpers
This package provides a set of traits you can use to extend the functionality of your enums in Laravel.
Table of Contents
- Installation
- Usage
- Changelog
- License
Installation
You can install the package via composer:
Usage
Collection support
Add the following trait to your backed enum to get collection support:
This allows you to collect enum cases easily into a Laravel collection:
Getting a collection of values
You can get a collection of enum values using the collect('value') method:
Getting a collection of return values of a function
You can get a collection of return values of a function by passing the function name to the collect() method:
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
All versions of enum-helpers with dependencies
illuminate/contracts Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16