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

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

luuka/laravel-base-repository
=============================

A simple package to create a make:repository command for Laravel

v1(2y ago)073PHPPHP &gt;=5.4.0

Since Mar 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tinhtvofficial/laravel-base-repository)[ Packagist](https://packagist.org/packages/luuka/laravel-base-repository)[ RSS](/packages/luuka-laravel-base-repository/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel PHP Artisan Make:Repository
===================================

[](#laravel-php-artisan-makerepository)

A simple package for addding `php artisan make:repository` command to Laravel 5 and above

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

[](#installation)

Require the package with composer using the following command:

`composer require luuka/laravel-base-repository --dev`

Or add the following to your composer.json's require-dev section and `composer update`

```
"require-dev": {
          "luuka/laravel-base-repository": "*"
}
```

Usage
-----

[](#usage)

`php artisan make:repository your-repository-name`

Example:

```
php artisan make:repository UserRepository

```

or

```
php artisan make:repository Backend/UserRepository

```

The above will create a repositories directory inside the app directory.

Once the repository is generated add your model class and return it in the model function,

Example:

```
