rawilk/laravel-casters

A collection of custom casts for Laravel.
6,726 6
Install
composer require rawilk/laravel-casters
Latest Version:v4.0.0
PHP:^8.2
Laravel:11 · 12 · 13
Older releases:7 – 10
License:MIT
Last Updated:Jun 24, 2026
Links: GitHub  ·  Packagist
Maintainer: rawilk

Casts for Laravel

Latest Version on Packagist Tests Total Downloads PHP from Packagist License

Social image

Casts for Laravel is a collection of custom class casts for Laravel Eloquent Models.

protected $casts = [
    // 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.

Related Packages

rawilk/filament-quill

Quill rich text editor for Filament.

63,295 37
rawilk/laravel-ups

UPS api wrapper for Laravel.

28,192 11
rawilk/laravel-webauthn

Add webauthn functionality to Laravel

15,352 27
rawilk/laravel-app-key-rotator

Rotate app keys around while re-encrypting data.

11,412 23
rawilk/laravel-settings

Store Laravel application settings in the database.

251,873 304

Version History

Version Released PHP Laravel License
v4.0.0 ^8.2 ^11.0|^12.0|^13.0 MIT
v3.1.1 ^8.1|^8.2|^8.3|^8.4 ^9.0|^10.0|^11.0|^12.0 MIT
v3.1.0 ^8.1|^8.2|^8.3 ^9.0|^10.0|^11.0 MIT
v3.0.4 ^8.1|^8.2|^8.3 ^9.0|^10.0|^11.0 MIT
v3.0.3 ^8.1|^8.2 ^9.0|^10.0 MIT