PHPackages                             san4io/repository - 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. san4io/repository

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

san4io/repository
=================

Reusable Laravel repository interface.

v3.1.1(9y ago)0263MITPHPPHP &gt;=5.6.4

Since Dec 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/san4io/repository)[ Packagist](https://packagist.org/packages/san4io/repository)[ RSS](/packages/san4io-repository/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (18)Used By (0)

Caffeinated Repository
======================

[](#caffeinated-repository)

[![Source](https://camo.githubusercontent.com/2774778e4841fafdb5e2aa4fe6f0d60e105eb761a0650d18bf6c6f3f4e4e5762/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6361666665696e617465642f7265706f7369746f72792d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/caffeinated/repository)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)

Getting Started
---------------

[](#getting-started)

### Introduction

[](#introduction)

The Caffeinated Repository package allows the means to implement a standard boilerplate repository interface. This covers the standard Eloquent methods in a non-static, non-facade driven way right out of the box. Fear not though Batman! The Caffeinated Repository package does not limit you in any way when it comes to customizing (e.g overriding) the provided interface or adding your own methods.

Installing Caffeinated Repository
---------------------------------

[](#installing-caffeinated-repository)

It is recommended that you install the package using Composer.

```
composer require caffeinated/repository

```

This package is compliant with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you find any compliance oversights, please send a patch via pull request.

Using Repositories
==================

[](#using-repositories)

### Create a Model

[](#create-a-model)

Create your model like you normally would. We'll be wrapping our repository around our model to access and query the database for the information we need.

```
