PHPackages                             reshadman/eloquent-faster - 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. reshadman/eloquent-faster

ActiveLibrary

reshadman/eloquent-faster
=========================

Simple none-I/O cache for eloquent model configs, like mutators and accessors.

1.0.1(10y ago)53.8k[1 issues](https://github.com/reshadman/eloquent-faster/issues)MITPHP

Since Jun 15Pushed 10y ago2 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Eloquent Faster
===============

[](#eloquent-faster)

Simple none-I/O cache for eloquent model accessor and mutators.

[![Build Status](https://camo.githubusercontent.com/2a3e88fd5d34b2179e830a234fab4e8ed746e7523f543a981052f313e73828be/68747470733a2f2f7472617669732d63692e6f72672f7265736861646d616e2f656c6f7175656e742d6661737465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/reshadman/eloquent-faster)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0ca28205059aa4eaf6bfab38a0b6825654e71902dcd2dac515b19f94e3f68b1e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7265736861646d616e2f656c6f7175656e742d6661737465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/reshadman/eloquent-faster/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/acf50ad7e4079f24b463bae25f8f5b2d1a5d9f1af6e1d0dce8a835554623907c/68747470733a2f2f706f7365722e707567782e6f72672f7265736861646d616e2f656c6f7175656e742d6661737465722f762f737461626c65)](https://packagist.org/packages/reshadman/eloquent-faster)[![Total Downloads](https://camo.githubusercontent.com/310b5f22521a484cba703a4344fdae341b3fad54038fc56d05f2a83b5f45bc4f/68747470733a2f2f706f7365722e707567782e6f72672f7265736861646d616e2f656c6f7175656e742d6661737465722f646f776e6c6f616473)](https://packagist.org/packages/reshadman/eloquent-faster)

### Installation

[](#installation)

```
composer require "reshadman/eloquent-faster"
```

### Usage

[](#usage)

First you need to add the following service provider to your application

```
return [
     //.. other config

     'providers' => [
        // other providers
        \Reshadman\EloquentFaster\EloquentFasterServiceProvider::class
     ]

];
```

Then run the following artisan command

```
php artisan eloquent:cache

```

For clearing cache

```
php artisan eloquent:clear

```

> If you use *OPCACHE* in your PHP installation, this class will not use I/O for each script run, as opcache loads code into memory.

### Problem

[](#problem)

Simply the problem begins from [this issuge](https://github.com/laravel/framework/issues/9276).

> Currently the eloquent model class contains a cache strategy for getters which first fetches all class methods and runs a loop on them filtering them by a regular expression. This occurs [only once](https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L3207) per unique eloquent final object. The getter cache container is only filled up with the [processed snake case attribute key](https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L3238).

> Each time a new model class is created for first time a loop with 50 to 100 iterations with processing a regular expression is run.

> Wouldn't it be cool to have something like `php artisan eloquent:cache` for this ?

### Running unit tests

[](#running-unit-tests)

Clone the repo

```
git clone git@github.com:reshadman/eloquent-faster.git

```

Then run `composer update`

Now you can run phpunit in the repo folder.

```
vendor/bin/phpunit

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7985e67db6ac1969983a7a21f8f8db55bdc6d498d9e3bf0796b26cd2de3e3c12?d=identicon)[reshadman](/maintainers/reshadman)

---

Top Contributors

[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/reshadman-eloquent-faster/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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