PHPackages                             faiverson/gateway-pattern - 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. faiverson/gateway-pattern

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

faiverson/gateway-pattern
=========================

Abstraction Layer to use repository/gateway pattern in Laravel 5.5 or higher

2.0.0(8y ago)34371ApachePHPPHP &gt;=7.0

Since Jun 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/faiverson/gateways)[ Packagist](https://packagist.org/packages/faiverson/gateway-pattern)[ RSS](/packages/faiverson-gateway-pattern/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (0)

Gateways
========

[](#gateways)

[![Build Status](https://camo.githubusercontent.com/c59043e0b28eab034f19dabc49c9222c43e3fbe5e0c6bc2837a5c0086132a211/68747470733a2f2f7472617669732d63692e6f72672f6c61726176656c2f6672616d65776f726b2e737667)](https://travis-ci.org/faiverson/gateways)[![Total Downloads](https://camo.githubusercontent.com/8ee7df76986d4528c4d0566e2a2fb3575426dcf8cfedaa835171a3cfac173402/68747470733a2f2f706f7365722e707567782e6f72672f666169766572736f6e2f676174657761792d7061747465726e2f642f746f74616c2e737667)](https://packagist.org/packages/faiverson/gateway-pattern)[![Latest Stable Version](https://camo.githubusercontent.com/dfb8b15075dbc214752d13e2dc3b828580ada0e0ac104f80d65e3c8eb7f72d85/68747470733a2f2f706f7365722e707567782e6f72672f666169766572736f6e2f676174657761792d7061747465726e2f762f737461626c652e737667)](https://packagist.org/packages/faiverson/gateway-pattern)[![License](https://camo.githubusercontent.com/afd93d49b28b96981eeeb9bc368334606c3841e1c0d43e817730926032df3f30/68747470733a2f2f706f7365722e707567782e6f72672f666169766572736f6e2f676174657761792d7061747465726e2f6c6963656e73652e737667)](https://packagist.org/packages/faiverson/gateway-pattern)

\[!\[Coverage Status\]([https://coveralls.io/repos/github/faiverson/gateways/badge.svg?branch=master)\](https://coveralls.io/github/faiverson/gateways?branch=master](https://coveralls.io/repos/github/faiverson/gateways/badge.svg?branch=master)](https://coveralls.io/github/faiverson/gateways?branch=master)) Gateways Installation
---------------------

[](#gateways-installation)

This package is a layer to interact between Controller and Model. If you want to create an abstraction layer to centralize all the queries in one class, instead of being adding models (eloquent queries) in a controller. What about to repeat that code in a command or observer or any other peace of the puzzle. This is where Gateways are handy! You only need to inject the Gateway dependency whereever you want.

- Install the package [Gateways](https://github.com/faiverson/gateways) using composer:
    `composer require faiverson/gateway-pattern`
- Run the command:
    `php artisan vendor:publish`

Done!

How to Use
----------

[](#how-to-use)

- Go to the console and you can run:
    `make:gateways:controller  Create a new controller class make:gateways:full        Create a new Repository class make:gateways:gateway     Create a new Gateway class make:gateways:interface   Create a new Interface class make:gateways:model       Create a new Eloquent model class make:gateways:repository  Create a new Repository class`-Copy the line generated in your console into app/Providers/RepositoryServiceProvider.php e.g. `$this->app->bind('App\Repositories\Interfaces\FooInterface', 'App\Repositories\FooRepository'); `
- create your route

License
-------

[](#license)

This package is open-sourced software licensed under the [Apache license](https://www.apache.org/licenses/LICENSE-2.0).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~209 days

Total

2

Last Release

3059d ago

Major Versions

1.0.0 → 2.0.02017-12-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff52e75de3c399801996dcddd1e25ccadd2026a1907b65f50a63b12799b93fb0?d=identicon)[faiverson](/maintainers/faiverson)

---

Top Contributors

[![faiverson](https://avatars.githubusercontent.com/u/771657?v=4)](https://github.com/faiverson "faiverson (26 commits)")

---

Tags

laravellaravel-5-packagepatterns

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/faiverson-gateway-pattern/health.svg)

```
[![Health](https://phpackages.com/badges/faiverson-gateway-pattern/health.svg)](https://phpackages.com/packages/faiverson-gateway-pattern)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
