PHPackages                             laravie/cabinet - 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. [Caching](/categories/caching)
4. /
5. laravie/cabinet

ActiveLibrary[Caching](/categories/caching)

laravie/cabinet
===============

Runtime Cache for Laravel Eloquent

v3.0.2(5y ago)1212.6k↓58.3%2MITPHPPHP ^7.3 || ^8.0

Since Nov 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/laravie/cabinet)[ Packagist](https://packagist.org/packages/laravie/cabinet)[ Fund](https://paypal.me/crynobone)[ Fund](https://liberapay.com/crynobone)[ RSS](/packages/laravie-cabinet/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (16)Used By (0)

Runtime Cache for Laravel Eloquent
==================================

[](#runtime-cache-for-laravel-eloquent)

Cabinet allows you to attach runtime or persistent caching to any Laravel Eloquent instance.

[![tests](https://github.com/laravie/cabinet/actions/workflows/tests.yml/badge.svg)](https://github.com/laravie/cabinet/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/9e89308d030622264651323f54b7f08a5dd44186c4010d5cd7b7fbfb81779e58/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f636162696e65742f762f737461626c65)](https://packagist.org/packages/laravie/cabinet)[![Total Downloads](https://camo.githubusercontent.com/686992412d45741980126d2920ae1077aa265c4ac8a0550668a36204a59b3580/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f636162696e65742f646f776e6c6f616473)](https://packagist.org/packages/laravie/cabinet)[![Latest Unstable Version](https://camo.githubusercontent.com/fd2e44f2b325b58ff1916154150e51cf593329a33949ebd6f12c9dff74c632d6/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f636162696e65742f762f756e737461626c65)](https://packagist.org/packages/laravie/cabinet)[![License](https://camo.githubusercontent.com/4aba8f607e4bbe404869cac25551aac354d9910c5c8da1c8f311433d48fc83ac/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617669652f636162696e65742f6c6963656e7365)](https://packagist.org/packages/laravie/cabinet)

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

[](#installation)

To install through composer, simply put the following in your `composer.json` file:

```
{
    "require": {
        "laravie/cabinet": "^3.0"
    }
}
```

And then run `composer install` or `composer update` from the terminal.

### Quick Installation

[](#quick-installation)

Above installation can also be simplify by using the following command:

```
composer require "laravie/cabinet=^3.0"
```

Usages
------

[](#usages)

### Setup Cabinet on a Model

[](#setup-cabinet-on-a-model)

You first need to add `Laravie\Cabinet\Cabinet` on an Eloquent Model such as:

```
