wendelladriel / laravel-lift
Take your Eloquent Models to the next level
Requires
- php: ^8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- illuminate/validation: ^11.0|^12.0|^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/pint: ^1.27
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-faker: ^3.0|^4.0
- phpstan/phpstan: ^2.1
- dev-main
- v0.19.1
- v0.19.0
- v0.18.0
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.2
- v0.14.1
- v0.14.0
- v0.13.1
- v0.13.0
- v0.12.2
- v0.12.1
- v0.12.0
- v0.11.2
- v0.11.1
- v0.11.0
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.1
- v0.1.0
- dev-fix/default-value-issue
This package is auto-updated.
Last update: 2026-06-04 09:40:21 UTC
README
Warning
This is an experimental package!
🏋️ Lift for Laravel
Take your Eloquent Models to the next levelInstallation
You can install the package via composer:
composer require wendelladriel/laravel-lift
Usage
Add the Lift trait to models that should use typed public properties and Lift attributes:
use Illuminate\Database\Eloquent\Model; use WendellAdriel\Lift\Attributes\Cast; use WendellAdriel\Lift\Attributes\Fillable; use WendellAdriel\Lift\Attributes\Rules; use WendellAdriel\Lift\Lift; final class Product extends Model { use Lift; #[Fillable] #[Rules(['required', 'string', 'max:255'])] public string $name; #[Fillable] #[Cast('integer')] #[Rules(['required', 'integer', 'min:0'])] public int $stock; }
Lift reads those attributes and applies the matching Eloquent configuration through model events. This keeps model behavior close to the property it describes while still using standard Eloquent models.
Access the full documentation here.
Changelog
Please see the changelog for more information on what has changed recently.
Contributing
Thank you for considering contributing to Lift! You can read the contribution guide here.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
Lift is open-sourced software licensed under the MIT license.