PHPackages                             aaronjan/housekeeper - 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. [Framework](/categories/framework)
4. /
5. aaronjan/housekeeper

AbandonedArchivedLibrary[Framework](/categories/framework)

aaronjan/housekeeper
====================

Powerful, simple Repository-Pattern implementation for Laravel (&gt;=5.1), and it come with tests.

v2.3.4(8y ago)242582[1 issues](https://github.com/AaronJan/Housekeeper/issues)Apache-2.0PHPPHP &gt;=5.5.0

Since Jul 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/AaronJan/Housekeeper)[ Packagist](https://packagist.org/packages/aaronjan/housekeeper)[ RSS](/packages/aaronjan-housekeeper/feed)WikiDiscussions master Synced 1mo ago

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

[ ![Housekeeper](https://camo.githubusercontent.com/c781c05a7b535208b3215b99d86375e404f31af2d42a9fb3bb83de30d5b83238/68747470733a2f2f6161726f6e6a616e2e6769746875622e696f2f486f7573656b65657065722f696d616765732f6c6f676f5f76322e706e67 "Housekeeper")](https://github.com/AaronJan/Housekeeper)[![Latest Stable Version](https://camo.githubusercontent.com/7a5422911b4350e16e95c8b141cc0db3aff700e619ea16d5ca8838608c6cc7fa/68747470733a2f2f706f7365722e707567782e6f72672f6161726f6e6a616e2f686f7573656b65657065722f762f737461626c65)](https://packagist.org/packages/aaronjan/housekeeper)[![License](https://camo.githubusercontent.com/3c4a527da756b3ec9b8dd113989cabe97066fedfaae28487840fab9b416ed7f0/68747470733a2f2f706f7365722e707567782e6f72672f6161726f6e6a616e2f686f7573656b65657065722f6c6963656e7365)](https://packagist.org/packages/aaronjan/housekeeper)

Housekeeper - Laravel
=====================

[](#housekeeper---laravel)

After nearly six months developing, testing and polishing, the first stable version of `Housekeeper 2` is finally released!

`Housekeeper` aims to be the coolest, handiest `Repository Pattern` implementation, any useful suggestion and PR are welcomed.

Increasing unit test code coverage is a work in progress (lots of works), but there is a set of integration tests running locally that covered most code.

Introduction
------------

[](#introduction)

`Housekeeper` is a flexable and powerful `Repository Pattern` implemention for `Laravel`. In addition to the basic `Repository Pattern` and elegant syntax, `Housekeeper` has features like `Injection system`, Auto-Booting Method that will let you creating endless possibilities. The goal of `Housekeeper` is free you from the redundant and boring [`DAL`](https://en.wikipedia.org/wiki/Data_access_layer) stuff, coding more intuitively.

Sections
--------

[](#sections)

- [Repository Pattern and Housekeeper](#repository-pattern-and-housekeeper)
- [Installation](#installation)
- [TL;DR (Quick start)](#tldr)
- [Features](#features)
- [API](#api)
- [Abilities](#abilities)
    - [Adjustable](#adjustable)
    - [Eloquently](#eloquently)
    - [CacheStatically](#cachestatically)
    - [Guardable](#guardable)
    - [SoftDeletes](#softdeletes)
- [Issue](#issue)
- [Lisence](#lisence)
- [Credits](#credits)

Repository Pattern and Housekeeper
----------------------------------

[](#repository-pattern-and-housekeeper)

The `Repository Pattern` is a software design pattern. In a nutshell, it means to encapsulate your data interaction code as methods that belong to different classes (Base on data domain), we call this type of class as `Repository`. When your business logic layer needs to accessing data such as an article entry in the database, it should ask to the `Article Repository` instead of writing inline query that deal with database directly.

OK, but ... I already got Eloquent, why not just using that?

Of course you can! But there're people who's not a fan of the Active Record, it just doesn't feel right for them, for these people, the Repository Pattern makes more sense. Besides, you can write method that is more expressive on your repository class, like **getActivatedUsers()**, and you can write tests for them very easily.

More importantly, `Housekeeper` is a better version of `Repository Pattern` (In some ways), you could read more about it below.

Housekeeper loves Eloquent. Most query APIs are the same as the Eloquent's, so you can use them without the needing to learn anything, and the returns are like Eloquent's too.

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

[](#installation)

### Requirement

[](#requirement)

`PHP` `>= 5.5` and `Laravel` `>= 5.1`

### Install Via Composer

[](#install-via-composer)

```
$ composer require aaronjan/housekeeper ~2.3

```

or add these to your `composer.json` file:

```
	"require": {
        "aaronjan/housekeeper": "~2.3"
    }

```

then execute console command:

```
$ composer install

```

After `Composer` finish running, add the `HousekeeperServiceProvider` to the providers in `config/app.php`:

```
