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

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

cuongnd88/lara-repository
=========================

Auto-generated Interface and Repository files

1.2(4y ago)145.8k2MITPHP

Since Jun 18Pushed 4y ago1 watchersCompare

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

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Auto-generated Repository Pattern in Laravel
============================================

[](#auto-generated-repository-pattern-in-laravel)

A repository is a separation between a domain and a persistent layer. The repository provides a collection interface to access data stored in a database, file system or external service. Data is returned in the form of objects.

The main idea to use `Repository Pattern` in a Laravel application is to create a bridge between models and controllers. This pattern keeps your Laravel code clean and safe, it is worth using repositories to separate the responsibility for which the model should never be responsible.

This package assists to automatically generate the Interface, Repository, Model and Controller files in saving your time and supporting to focus on implementing the logic. `Especially, you do not need binding the interface and repository class in Service provider class`

1-Install `cuongnd88/lara-repository` using Composer.

```
$ composer require cuongnd88/lara-repository
```

2-Add the following service provider in `config/app.php`

```
