Download the PHP package pentacore/laravel-utils without Composer
On this page you can find all versions of the php package pentacore/laravel-utils. 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-utils
laravel-utils
A collection of commonly used Laravel utilities, traits, and helpers.
Requirements
- PHP
^8.3 - Laravel
^11.0 || ^12.0 || ^13.0
Installation
The service provider is auto-discovered.
Utilities
EnumUtils trait
Adds a set of helpers to any backed enum.
| Method | Description |
|---|---|
Status::names() |
Array of case names. |
Status::values() |
Array of backing values. |
Status::array() |
Associative array [value => name]. |
Status::validationRule() |
Rule::in(values) for use in form requests / validators. |
Status::iterator() |
Generator keyed by case name. |
Status::mapForSelect($withNull, $labelKey) |
Sorted [label, value] list for select dropdowns. |
Status::commaSeparatedValues() |
Comma-separated string of values. |
$case->asSlug() |
URL-friendly slug of the value. |
$case->toString() |
Value cast to string. |
$case->equals($value) |
Strict comparison of value. |
If a case implements a label() method, mapForSelect() will use it instead of the case name.
Testing
License
MIT
All versions of laravel-utils with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.3 || ^8.4 || ^8.5
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/validation Version ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/validation Version ^11.0 || ^12.0 || ^13.0
The package pentacore/laravel-utils contains the following files
Loading the files please wait ...