Skip to content

rawilk/laravel-casters

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

laravel-casters

Latest Version on Packagist Tests Total Downloads PHP from Packagist License

laravel-casters 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`.
    '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:

License

The MIT License (MIT). Please see License File for more information.