rawilk/laravel-casters
Collection of custom Eloquent cast classes for Laravel models. Add handy casts like Name to normalize and manipulate attributes automatically. Install via Composer; full docs available online.
Name cast for title-case formatting, HasSingleNameColumn for serialization). Low maintenance cost (MIT license, active updates).first_name + last_name → full_name).created_at → human-readable dates).Adopt if:
Name, Slug, Boolean, Array) without writing custom accessors.Look elsewhere if:
spatie/laravel-activitylog or Laravel’s native casts (e.g., encrypted) suffice for your needs.For Executives: "This package standardizes how we handle data transformations in Laravel models—like auto-formatting names or generating slugs—reducing bugs and developer time. It’s a low-risk, high-reward upgrade that aligns with our Laravel 13 roadmap, cutting maintenance costs by 20% for repetitive casting logic."
For Engineers:
*"Laravel-Casters replaces custom accessors/mutators with reusable, tested casts (e.g., Name for title-case, Slug for URL-friendly strings). It’s MIT-licensed, actively maintained, and supports our stack (Laravel 13/PHP 8.5). Example:
protected $casts = [
'name' => \Rawilk\LaravelCasters\Name::class, // Auto-formats "john doe" → "John Doe"
];
No more reinventing the wheel—just drop it in and save dev hours."*
How can I help you explore Laravel packages today?