PHPackages                             su-1294/base-repository-laravel - 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. su-1294/base-repository-laravel

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

su-1294/base-repository-laravel
===============================

Base repository implementation for Laravel

1133PHP

Since Jun 7Pushed 6y agoCompare

[ Source](https://github.com/sunh-2087/base-repository)[ Packagist](https://packagist.org/packages/su-1294/base-repository-laravel)[ RSS](/packages/su-1294-base-repository-laravel/feed)WikiDiscussions master Synced yesterday

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 su-1294/base-repository-laravel
```

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...

    Kenini\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:repostitory 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

```
