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

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

unostentatious/repository
=========================

An abstraction layer that let's you implement repository pattern for your models.

v1.3.1(2y ago)018MITPHPPHP &gt;=7.4CI failing

Since Feb 13Pushed 2y agoCompare

[ Source](https://github.com/unostentatious/repository)[ Packagist](https://packagist.org/packages/unostentatious/repository)[ RSS](/packages/unostentatious-repository/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (3)Versions (12)Used By (0)

 [![Unostentatious Repository](https://repository-images.githubusercontent.com/240037373/291a4280-4e92-11ea-817d-dd947c29c107)](https://repository-images.githubusercontent.com/240037373/291a4280-4e92-11ea-817d-dd947c29c107)

[![Latest Stable Version](https://camo.githubusercontent.com/757b242cc43ce2c5e87ed7814a8878114022c745c66703fa88f0715a498df4b8/68747470733a2f2f706f7365722e707567782e6f72672f756e6f7374656e746174696f75732f7265706f7369746f72792f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/unostentatious/repository)[![Total Downloads](https://camo.githubusercontent.com/0d641cb215a5e6883590f447209d26f7e2f6dc39d5eae6d3b62bde878b056099/68747470733a2f2f706f7365722e707567782e6f72672f756e6f7374656e746174696f75732f7265706f7369746f72792f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/unostentatious/repository)[![License](https://camo.githubusercontent.com/d628c218e78108e87c19d674e4a06800fea7605c7e9912a21a447baf073d7f55/68747470733a2f2f706f7365722e707567782e6f72672f756e6f7374656e746174696f75732f7265706f7369746f72792f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/unostentatious/repository)

Unostentatious Repository
=========================

[](#unostentatious-repository)

An abstraction layer that let's you implement repository pattern for your models.

### Requirements

[](#requirements)

- PHP 7.4^
- Laravel 8.x / Lumen 8.x

### Installation

[](#installation)

#### Step 1: Install through Composer

[](#step-1-install-through-composer)

```
composer require unostentatious/repository
```

---

#### Step 2: Publish the service provider

[](#step-2-publish-the-service-provider)

##### In Laravel:

[](#in-laravel)

1. In `Laravel`, edit `config\app.php` and add the provider under package service provider section:

```
 /*
  * Package Service Providers...
  */
 \Unostentatious\Repository\Integration\Laravel\UnostentatiousRepositoryProvider::class,
```

2. Then open your terminal, while in the `Laravel` app's root directory, publish the vendor:

```
php artisan vendor:publish --provider="Unostentatious\Repository\Integration\Laravel\UnostentatiousRepositoryProvider"
```

---

##### In Lumen:

[](#in-lumen)

1. Copy the `unostent-repository.php` config file from `vendor/unostentatious/repository/Integration/config/` directory
2. If the `{root}/config/` directory is not existing in your Lumen app, make sure to create it first, paste the config file you just copied
3. Edit `bootstrap/app.php` then register the service provider and add the package's config explicitly like so:

```
// Other actions...

$app->register(\Unostentatious\Repository\Integration\Laravel\UnostentatiousRepositoryProvider::class);
$app->configure('unostent-repository');
```

---

#### Step 3: Custom Configurations

[](#step-3-custom-configurations)

Right now the package's configuration is already residing to your app's config directory `/config`, there are 3 values in the package's config that you can customize to fit your needs:

```
