xcopy / laravel-support
Useful Laravel support utilities.
Fund package maintenance!
v1.0.0
2026-03-22 03:48 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^11.0||^12.0
- illuminate/database: ^11.0||^12.0
- illuminate/support: ^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
Useful Laravel support utilities.
Installation
composer require xcopy/laravel-support
Features
Enum Traits
- HasLabel – Generates human-readable labels from enum values
- HasValues – Returns array of all enum values
- HasChoices – Returns enum cases as value => label pairs for dropdowns
- HasStaticCase – Magic static method access using camelCase only
Eloquent Casts
- AsEmailString – Trims and lowercases email addresses
- AsModelClass – Casts to model class name
- AsTitledString – Converts to a title case
- AsTrimmedString – Trims whitespace
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.