PHPackages                             ablunier/laravel-database - 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. ablunier/laravel-database

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

ablunier/laravel-database
=========================

Laravel database utilities package. Repository, cache, abstraction layer.

v1.4.2(8y ago)14.4k11MITPHPPHP &gt;=5.5.9

Since Jul 10Pushed 8y ago3 watchersCompare

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

READMEChangelog (10)Dependencies (7)Versions (18)Used By (1)

Laravel Database [![Build Status](https://camo.githubusercontent.com/606c78778d451b8dc38576b52bd91821584ffe8ed89649c9f1172adfeef939fd/68747470733a2f2f7472617669732d63692e6f72672f61626c756e6965722f6c61726176656c2d64617461626173652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ablunier/laravel-database) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/290b7bc09d37ed16d8abc41c8c6c5c12c3a49c60a3b3639700af2d195583f63d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61626c756e6965722f6c61726176656c2d64617461626173652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ablunier/laravel-database/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/d1c5276afa2a5aced7f0e50e9a6bb108a55938320a7207c5eae82c46270e3d8a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61626c756e6965722f6c61726176656c2d64617461626173652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ablunier/laravel-database/?branch=master)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-database---)

This package provides some utilities and patterns to work with Laravel databases

> **Note:** This package is in active development and NOT ready for production.

### Features

[](#features)

- Automatic default and extendable repository pattern.
- Cache system over repository pattern.
- Model abstraction layer.

### Requirements

[](#requirements)

- PHP 5.5 or higher.
- Laravel 5.

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

[](#installation)

Require this package with composer:

```
composer require ablunier/laravel-database

```

After updating composer, add the ServiceProvider and Facade (optional) to the app.php config file:

```
// config/app.php

'providers' => [
    '...',
    Ablunier\Laravel\Database\Manager\ModelManagerServiceProvider::class,
];

'aliases' => [
    '...',
    'ModelManager' => Ablunier\Laravel\Database\Manager\Facades\ModelManager::class,
];
```

Copy the package config to your local config with the publish command:

```
php artisan vendor:publish

```

Usage
-----

[](#usage)

### Repository pattern

[](#repository-pattern)

```
