renoki-co / laravel-useful-casts
Laravel Useful Casts is a simple package for Laravel 7.0+ that comes with already-tested and already-written, useful casts for Eloquent models.
Fund package maintenance!
rennokki
Installs: 3 572
Dependents: 1
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 1
Open Issues: 3
Requires
- illuminate/contracts: ^9.35|^10.5
- illuminate/database: ^9.35|^10.5
- illuminate/support: ^9.35|^10.5
Requires (Dev)
- laravel/legacy-factories: ^1.3
- mockery/mockery: ^1.5
- orchestra/testbench: ^7.23|^8.3
- phpunit/phpunit: ^9.5.21
This package is auto-updated.
Last update: 2024-08-30 04:31:02 UTC
README
Laravel Useful Casts is a simple package for Laravel 7.0+ that comes with already-tested and already-written, useful casts for Eloquent models.
🤝 Supporting
If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with Github Sponsors. 📦
🚀 Installation
You can install the package via composer:
composer require renoki-co/laravel-useful-casts
🙌 Usage
use RenokiCo\UsefulCasts\Casts\Encrypted; class User extends Model { protected $casts = [ 'ssn' => Encrypted::class, ]; } // 'ssn' value gets encrypted in the database. $user->update(['ssn' => '12345678']);
Available Casts
🐛 Testing
vendor/bin/phpunit
🤝 Contributing
Please see CONTRIBUTING for details.
🔒 Security
If you discover any security related issues, please email alex@renoki.org instead of using the issue tracker.