PHPackages                             kodebyraaet/pattern - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kodebyraaet/pattern

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

kodebyraaet/pattern
===================

The base for the repository pattern that we use in Kodebyraaet

v0.4.5(8y ago)11.3kMITPHPPHP &gt;=5.5.9

Since Aug 19Pushed 8y ago11 watchersCompare

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

READMEChangelog (10)DependenciesVersions (23)Used By (0)

Kodebyraaet Pattern for Laravel 5 and Lumen
===========================================

[](#kodebyraaet-pattern-for-laravel-5-and-lumen)

The base for the repository pattern we use in Kodebyraaet.

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

[](#installation)

Install composer dependency.

```
composer require kodebyraaet/pattern

```

If you are using Laravel add the Service Provider to the config/app.php file.

```
Kodebyraaet\Pattern\BaseRepositoryServiceProvider::class,

```

If you are using Lumen add the Service Provider to the bootstrap/app.php file.

```
$app->register(Kodebyraaet\Pattern\BaseRepositoryServiceProvider::class);

```

### Create the base repositories

[](#create-the-base-repositories)

If you have the [Kodebyraaet Generators](https://github.com/Kodebyraaet/generators) installed you can just run the following command:

```
php artisan make:base-repository

```

Or you can do it manually:

##### Create the file `App\Entities\Repository.php` (the namespace may differ):

[](#create-the-file-appentitiesrepositoryphp-the-namespace-may-differ)

```
