Skip to content

AnourValar/eloquent-serialize

Repository files navigation

Serialization for Eloquent's QueryBuilder

Supports: Laravel 6 - Laravel 11

Installation

composer require anourvalar/eloquent-serialize

Usage

Serialize

$package = \EloquentSerialize::serialize(
    \App\User::query()
        ->with('userPhones')
        ->where('id', '>', '10')
        ->limit(20)
);

Unserialize

$builder = \EloquentSerialize::unserialize($package);

foreach ($builder->get() as $item) {
    // ...
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages