PHPackages                             anourvalar/eloquent-serialize - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. anourvalar/eloquent-serialize

ActiveLibrary[Database &amp; ORM](/categories/database)

anourvalar/eloquent-serialize
=============================

Laravel Query Builder (Eloquent) serialization

1.3.7(1mo ago)11120.2M↓14.8%1320MITPHPPHP ^8.0CI passing

Since Apr 5Pushed 2w ago2 watchersCompare

[ Source](https://github.com/AnourValar/eloquent-serialize)[ Packagist](https://packagist.org/packages/anourvalar/eloquent-serialize)[ Docs](https://github.com/AnourValar/eloquent-serialize)[ RSS](/packages/anourvalar-eloquent-serialize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (22)Versions (45)Used By (20)

Serialization for Eloquent's QueryBuilder
=========================================

[](#serialization-for-eloquents-querybuilder)

Supports: Laravel 6 - Laravel 12

Installation
------------

[](#installation)

```
composer require anourvalar/eloquent-serialize
```

Usage
-----

[](#usage)

### Serialize

[](#serialize)

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

### Unserialize

[](#unserialize)

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

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

###  Health Score

69

—

FairBetter than 100% of packages

Maintenance94

Actively maintained with recent releases

Popularity64

Solid adoption and visibility

Community27

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 84.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~75 days

Total

44

Last Release

52d ago

PHP version history (5 changes)1.0.0PHP &gt;=7.1.0

1.2.9PHP &gt;=7.1

1.2.13PHP ^7.1|^8.0

1.2.19PHP ^7.4|^8.0

1.3.7PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/db1765d50b04dca380c835746bee50f75be1683fd930f276def046cef17f5d2c?d=identicon)[AnourValar](/maintainers/AnourValar)

---

Top Contributors

[![AnourValar](https://avatars.githubusercontent.com/u/54237693?v=4)](https://github.com/AnourValar "AnourValar (56 commits)")[![faytekin](https://avatars.githubusercontent.com/u/4013224?v=4)](https://github.com/faytekin "faytekin (5 commits)")[![mokhosh](https://avatars.githubusercontent.com/u/6499685?v=4)](https://github.com/mokhosh "mokhosh (3 commits)")[![danharrin](https://avatars.githubusercontent.com/u/41773797?v=4)](https://github.com/danharrin "danharrin (2 commits)")

---

Tags

laravelserializeeloquentserializationcopyqueuequeryserializablebuilderjobquerybuilderanourvalar

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/anourvalar-eloquent-serialize/health.svg)

```
[![Health](https://phpackages.com/badges/anourvalar-eloquent-serialize/health.svg)](https://phpackages.com/packages/anourvalar-eloquent-serialize)
```

###  Alternatives

[elipzis/laravel-cacheable-model

Automatic query-based model cache for your Laravel app

15546.1k](/packages/elipzis-laravel-cacheable-model)[mpyw/laravel-local-class-scope

A tiny macro that reuse a global scope class as a local scope

24102.6k](/packages/mpyw-laravel-local-class-scope)[sarfraznawaz2005/indexer

Laravel package to monitor SELECT queries and offer best possible INDEX fields.

562.7k](/packages/sarfraznawaz2005-indexer)[brokerexchange/elasticbuilder

Query Builder for Elasticsearch.

111.1k](/packages/brokerexchange-elasticbuilder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
