Download the PHP package lazerg/laravel-enum-pro without Composer
On this page you can find all versions of the php package lazerg/laravel-enum-pro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-enum-pro
Laravel Enum Pro
Laravel Enum Pro
is a simple trait that extends PHP 8.1+ enums with helpful utilities for Laravel applications. It lets you access enum data in a variety of convenient ways while keeping your code clean and expressive.
Features
- Works directly with native PHP enums
- Access case values via static method calls
- Retrieve enum names and values as collections, arrays or strings
- Generate random values for testing and factories
- Build option and selection lists for form inputs
Installation
Basic Usage
Create an enum and include the trait:
Accessing Values
Working With Names
Working With Values
Randomization
Options and Selections
Use these helpers when building form inputs.
Example output of options()
:
Testing
Run the test suite with Pest:
License
This package is open-sourced software licensed under the MIT license as specified in composer.json
.
All versions of laravel-enum-pro with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1|^8.2|^8.3|^8.4
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
The package lazerg/laravel-enum-pro contains the following files
Loading the files please wait ....