PHPackages                             eup/base-repo - 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. eup/base-repo

ActiveLibrary

eup/base-repo
=============

Base repository implementation for Laravel

00PHP

Since May 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/TienPham30/base-repo)[ Packagist](https://packagist.org/packages/eup/base-repo)[ RSS](/packages/eup-base-repo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Documentation
-------------

[](#documentation)

To get started with **Base Repository**, use Composer to add the package to your project's dependencies:

```
    composer require eup/base-repo
```

Configuration
-------------

[](#configuration)

### Laravel 5.5+

[](#laravel-55)

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel &lt; 5.5:

[](#laravel--55)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
'providers' => [
    // Other service providers...

    Base\RepositoryServiceProvider::class,
],
```

### Basic Usage

[](#basic-usage)

Next, you are ready to use repository. If you want create repository with Model corresponding(example:UserRepository), run commnand line

```
php artisan make:repo UserRepository -i
```

When run this commnand, Packeage automatic generate two file in forder Repository: UserRepository and UserRepositoryInterface. UserRepository extends AbstractRepository so you can use method in AbstractRepository

```
