WendellAdriel/
laravel-lift
g4t.io

Boost your Eloquent Models with Laravel Lift

703 stars by Wendell Adriel

Take your Eloquent Models to the next level

README from WendellAdriel/laravel-lift Open on GitHub →

[!WARNING] This is an experimental package!

Installation

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.

More from the ecosystem

marcreichel/
laya-php
g4t.io
3 53

LayaPHP: Self-Hosted Text Classification for PHP and Laravel

Classify text in PHP without an LLM bill: typed decisions in 100+ languages, self-hosted. Laravel-ready SDK for Laya, a Jev AI alternative.

ai classification decision-engine
marcreichel/laya-php via Laravel News
Josh-Dovey/
postcodes-laravel
g4t.io
5 9

Postcodes for Laravel: GB Postcode Lookup and Geography Data

Postcodes for Laravel adds typed GB postcode lookups, validation, geography data, distance searches, and test fakes through the GB Postcodes API.

Josh-Dovey/postcodes-laravel via Laravel News
RedberryProducts/
mailbox-for-laravel
g4t.io
4 115

Mailbox for Laravel: Preview and Test Rendered Email

Mailbox for Laravel captures outgoing mail in a local dashboard and lets you test rendered HTML, recipients, and attachments with fluent assertions.

RedberryProducts/mailbox-for-laravel via Laravel News