rawilk / laravel-casters
A collection of custom casts for Laravel.
Fund package maintenance!
rawilk
Installs: 2 153
Dependents: 1
Suggesters: 1
Security: 0
Stars: 6
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.1|^8.2|^8.3
- ext-json: *
- illuminate/contracts: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- laravel/pint: ^1.5
- orchestra/testbench: ^7.0|^8.0|^9.0
- pestphp/pest: ^1.22|^2.0
- pestphp/pest-plugin-laravel: ^1.3|^2.0
- spatie/laravel-ray: ^1.31
README
Casts for Laravel is a collection of custom class casts for Laravel Eloquent Models. This package allows you to quickly and easily add casts for names and hashing passwords on your user models.
protected $casts = [ // Hashes the value when assigning to `$model->password`. // Note: Password cast is now deprecated. Use Laravel's hash cast instead. 'password' => Password::class, // Provides utilities for manipulating a name 'name' => Name::class, ];
Installation
You can install the package via composer:
composer require rawilk/laravel-casters
Documentation
For documentation, please refer to: https://randallwilk.dev/docs/laravel-casters
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
Please review my security policy on how to report security vulnerabilities.
Credits
Alternatives
Some alternatives to this package include:
Disclaimer
This package is not affiliated with, maintained, authorized, endorsed or sponsored by Laravel or any of its affiliates.
License
The MIT License (MIT). Please see License File for more information.