PHPackages                             matthewbdaly/laravel-repositories - 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. matthewbdaly/laravel-repositories

ActiveLibrary[Caching](/categories/caching)

matthewbdaly/laravel-repositories
=================================

A base repository class and interface, together with a caching decorator. Extend them for use in your own projects.

1.2.1(7y ago)121.2k13MITPHP

Since Nov 14Pushed 7y ago2 watchersCompare

[ Source](https://github.com/matthewbdaly/laravel-repositories)[ Packagist](https://packagist.org/packages/matthewbdaly/laravel-repositories)[ RSS](/packages/matthewbdaly-laravel-repositories/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (7)Versions (9)Used By (3)

laravel-repositories
====================

[](#laravel-repositories)

[![Build Status](https://camo.githubusercontent.com/5a5685034ab0192913f4a1c0e7d9d72ba542a8fde951f908807cc6c7cca7175a/68747470733a2f2f7472617669732d63692e6f72672f6d6174746865776264616c792f6c61726176656c2d7265706f7369746f726965732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/matthewbdaly/laravel-repositories)[![Coverage Status](https://camo.githubusercontent.com/7d37f82868c2e350da34f09825a1b2565551782a66ebd97f3440704b6b7a3bda/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6174746865776264616c792f6c61726176656c2d7265706f7369746f726965732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/matthewbdaly/laravel-repositories?branch=master)A base repository class and interface, together with a caching decorator. Extend them for use in your own projects.

The base interface is `Matthewbdaly\LaravelRepositories\Repositories\Interfaces\AbstractRepositoryInterface`. Your repositories should have interfaces that extend this, to facilitate type-hinting them.

This interface is implemented by both the abstract decorator `Matthewbdaly\LaravelRepositories\Repositories\Decorators\BaseDecorator` and the abstract repository `Matthewbdaly\LaravelRepositories\Repositories\Base`. Again, you should extend these classes to create your own repositories and decorators. You can then resolve these interfaces in your own service provider as follows:

```
