PHPackages                             temify/repository-pattern-maker - 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. temify/repository-pattern-maker

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

temify/repository-pattern-maker
===============================

create respository and interface and facade with single command

010PHP

Since Jun 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tameemahmad/repository-maker)[ Packagist](https://packagist.org/packages/temify/repository-pattern-maker)[ RSS](/packages/temify-repository-pattern-maker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Implementation of repository patteren and service layer using commands
======================================================================

[](#implementation-of-repository-patteren-and-service-layer-using-commands)

A simple Laravel 5 and laravel 6 library that allows you to implement Repository Pattern with a single command

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

[](#installation)

```
composer require temify/laravel-repository-pattern

```

Features
--------

[](#features)

Will generate

- Service class
- Interface implementations
- ServiceProvider for contracts

Enable the package (Optional)
-----------------------------

[](#enable-the-package-optional)

This package implements Laravel auto-discovery feature. After you install it the package provider and facade are added automatically .

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

[](#configuration)

Publish the configuration file

This step is required

```
php artisan vendor:publish --provider="Temify\RepositoryPattern\RepositoryPatterServiceProvider"

```

Usage
-----

[](#usage)

After publishing the configuration file just run the below command

```
php artisan make:repo YOURMODEL

```

That's it, Now you've successfully implemented the repository pattern

Example
-------

[](#example)

```
php artisan make:repo Product
```

#### ProductRepositoryInterface.php

[](#productrepositoryinterfacephp)

```
