genealabs/laravel-two-way-attribute-casting
A Laravel package that enables two-way attribute casting on Eloquent models, letting you transform values both when reading from and writing to the database with custom cast classes. Useful for encapsulating conversion logic in one place for cleaner, reusable model code.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bgaze/laravel-kvstore | 0.88 | bgaze/laravel-kvstore provides a simple, database-backed key-value store for Laravel applications. Store and retrieve arbitrary values—strings, arrays, objects—through an intuitive API with dot-notation support, caching, and easy integration for app settings, preferences, and small configuration dat... | 19 | — | 0 | — | 0 | 16.9 | — | MIT | 2 months ago | |
| lee-to/fast-attributes | 0.88 | lee-to/fast-attributes is a lightweight Laravel package for fast, expressive model attribute handling. It reduces boilerplate around accessors and casts, keeping Eloquent models clean, readable, and efficient—ideal for apps that want simpler model definitions without sacrificing performance. | 2 | 2 | 0 | 15K | 0 | 0.0 | 51.3 | MIT | 1 year ago | |
| hnhdigital-os/laravel-model-schema | 0.88 | Laravel Model Schema adds schema introspection to Eloquent models, letting you read column names, types, and related metadata directly from the model. Handy for generating forms, filters, validation rules, and admin scaffolding without querying the database manually. | 12 | 12 | 0 | 0 | 0 | 0.4 | — | MIT | 3 years ago | |
| neuecommerce/model-casts | 0.87 | — | 0 | 0 | 0 | 4K | 0 | 0.0 | 49.3 | MIT | — | |
| lionix/castable-request | 0.86 | Laravel package for casting incoming request data into typed objects and structured values, helping keep controllers clean and reducing manual array handling when working with validated input. | 23 | 23 | 0 | 281 | 0 | 18.2 | 17.7 | MIT | 1 month ago | |
| n7olkachev/laravel-computed-properties | 0.86 | Add computed properties to your Laravel Eloquent models, calculated on the fly like accessors but excluded from the database. Keep models lean, reuse derived values across queries and serialization, and write less boilerplate. | 187 | — | 8 | — | 0 | 1.2 | — | — | 8 years ago | |
| genealabs/laravel-casts | 0.86 | GeneaLabs Laravel Casts adds flexible custom attribute casting to Eloquent models, making it easy to map database columns to value objects, DTOs, and other PHP classes. Keeps model code clean and cast logic reusable, testable, and simple to configure. | 109 | 95 | 11 | 8K | 0 | 0.8 | 19.2 | MIT | 2 years ago | |
| renoki-co/laravel-useful-casts | 0.86 | renoki-co/laravel-useful-casts provides a collection of handy custom Eloquent casts for Laravel models, reducing boilerplate when converting database attributes into common PHP types and objects. Drop-in casts keep model code cleaner and more expressive. | 11 | — | 1 | — | 0 | 0.5 | — | Apache-2.0 | 3 years ago | |
| jessarcher/laravel-castable-data-transfer-object | 0.86 | A Laravel package that lets Eloquent models cast attributes directly to data transfer objects, keeping structured data typed and clean while handling JSON serialization automatically. Ideal for replacing loose arrays with explicit DTO classes. | 325 | 333 | 22 | 2K | 3 | 1.7 | 8.3 | MIT | 3 years ago | |
| vkovic/laravel-custom-casts | 0.86 | vkovic/laravel-custom-casts provides reusable, class-based custom attribute casts for Laravel Eloquent models, keeping get/set and serialization logic organized, testable, and out of your models—ideal for value objects, arrays, and other complex attribute transformations. | 217 | 217 | 20 | 2K | 2 | 2.4 | 14.9 | MIT | 5 years ago | |
| cviebrock/eloquent-typecast | 0.85 | — | 24 | 26 | 1 | 938 | 0 | 0.2 | 21.9 | MIT | — | |
| yuwuhsien/laravel-bcmath-cast | 0.85 | Laravel Eloquent casts for PHP 8.4's BCMath\Number object, turning model attributes into arbitrary-precision decimals so you can use natural operators like +, -, and * directly while keeping money math exact. Requires PHP 8.4+ and Laravel 12+. | 2 | 2 | 0 | 2K | 0 | 15.6 | 44.6 | MIT | 3 months ago | |
| snoeren-development/laravel-currency-casting | 0.85 | Laravel Currency Casting provides an Eloquent cast that stores monetary values as integers and exposes them as currency-aware objects, so you can format, convert, and calculate prices cleanly across your models without scattering money-handling logic throughout your application. | 5 | — | 4 | — | 0 | 9.0 | — | MIT | 7 months ago | |
| zero-to-prod/data-model | 0.84 | DataModel hydrates PHP objects from external data with a single from($data) call using reflection and type hints. Validation and casting live in #[Describe] attributes (required, nullable, default, assign), replacing manual property wiring and scattered null checks. | 139 | 140 | 7 | 2K | 0 | 29.0 | 18.4 | MIT | 2 months ago | |
| vicgutt/laravel-auto-model-cast | 0.84 | Automatically casts Laravel Eloquent model attributes based on their database column types, so you can skip manually maintaining $casts arrays. Keeps models tidy and casts in sync with your schema. | 7 | — | 0 | — | 0 | 0.0 | — | MIT | 3 years ago | |
| rawilk/laravel-casters | 0.84 | 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. | 6 | 6 | 0 | 576 | 0 | 15.4 | 29.2 | MIT | 5 months ago | |
| genealabs/laravel-overridable-model | 0.83 | Override Eloquent model methods and properties at runtime without touching vendor code. Define per-model overrides in your app to customize package models, swap behavior, or inject your own logic—keeping third-party code untouched and upgrades painless. | 93 | 92 | 5 | 11K | 0 | 0.5 | 20.5 | MIT | 2 years ago | |
| std-out/simple-data-objects | 0.83 | Lightweight, attribute-driven DTOs for PHP 8.4+ with zero runtime reflection and compiled per-class closures for fast hydration and serialization. Works standalone or in Laravel 12–13. | 35 | 35 | 0 | 202 | 0 | 27.3 | 13.2 | MIT | 3 weeks ago | |
| giacomomasseron/laravel-models-generator | 0.81 | Generate Eloquent models directly from an existing database with this Laravel artisan command. Supports MySQL, MariaDB, SQLite, PostgreSQL and SQLServer, plus polymorphic relations, UUID/ULID columns, enum, URI and JSON casting, and optional model factories. | 58 | 58 | 2 | 2K | 0 | 22.7 | 24.1 | MIT | 4 months ago | |
| genealabs/laravel-null-carbon | 0.81 | NullCarbon implements the Null Object pattern for Carbon in Laravel. When a date is missing, it stands in safely so date methods return null instead of throwing errors or defaulting to now, keeping models, Blade views, and formatting logic from breaking on nullable timestamps. | 56 | 56 | 0 | 9K | 0 | 0.7 | 30.3 | MIT | 2 years ago |
How can I help you explore Laravel packages today?