PHPackages                             taylornetwork/laravel-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. taylornetwork/laravel-repository

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

taylornetwork/laravel-repository
================================

A repository service provider to dynamically bind all existing repositories in app.

1.3.0(8y ago)158PHPPHP &gt;=7.0.0

Since Nov 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/taylornetwork/laravel-repository)[ Packagist](https://packagist.org/packages/taylornetwork/laravel-repository)[ RSS](/packages/taylornetwork-laravel-repository/feed)WikiDiscussions master Synced 4w ago

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

Repositories for Laravel
========================

[](#repositories-for-laravel)

An easy and customizable to create repositories that will be automatically registered for you.

Install
-------

[](#install)

Via Composer

```
$ composer require taylornetwork/laravel-repository
```

Setup
-----

[](#setup)

Add the service provider to the providers array in `config/app.php`

```
'providers' => [

	TaylorNetwork\LaravelRepository\RepositoryServiceProvider::class,

],
```

### Publish Config

[](#publish-config)

```
$ php artisan vendor:publish
```

Will add `repository.php` to your config directory.

Usage
-----

[](#usage)

The service provider will automatically bind repositories to their contracts based on the settings in `config/repository.php`

### Defaults

[](#defaults)

By default Repositories are stored in `App\Repositories\ModelName` where `ModelName` is the name of the model the repository will handle.

The default naming convention used is `ModelNameRepository` for the contract and `EloquentModelName` for the class.

### Commands

[](#commands)

#### make:repository

[](#makerepository)

This package adds the artisan command `repository:generate` to create the repository pattern based on settings in `config/repository.php`

To create a repository for the `User` model

```
$ php artisan repository:generate User
```

Will create

```
- ProjectRoot
	- app
		- Repositories
			- User
				- UserRepository.php
				- EloquentUser.php

```

If you are using a driver other than `Eloquent` you can specify using the `--driver` option

```
$ php artisan repository:generate User --driver=storage
```

Will create

```
- ProjectRoot
	- app
		- Repositories
			- User
				- UserRepository.php
				- StorageUser.php

```

*Note: If you plan on using other drivers add them to the `drivers` array in `config/repository.php`, the service provider will search for the class in the order of the array.*

#### make:repositoryClass

[](#makerepositoryclass)

Same as `repository:generate` but will only create the class, no contract.

```
$ php artisan repository:class User --driver=storage
```

Creates `app/Repositories/User/StorageUser.php`

#### make:repositoryContract

[](#makerepositorycontract)

Same as `repository:generate` but will only create the contract, no class.

```
$ php artisan repository:contract User
```

Creates `app/Repositories/User/UserRepository.php`

*Note: This command does not accept the `--driver` option.*

Credits
-------

[](#credits)

- Author: [Sam Taylor](https://github.com/taylornetwork)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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 ~97 days

Total

4

Last Release

3217d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.3.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/83340094473f0bf5b2cf062bf394df221a52a30aa0e21cd0a77302977d6393ce?d=identicon)[samueljtaylor](/maintainers/samueljtaylor)

---

Top Contributors

[![samyrataylor](https://avatars.githubusercontent.com/u/15961687?v=4)](https://github.com/samyrataylor "samyrataylor (17 commits)")

### Embed Badge

![Health badge](/badges/taylornetwork-laravel-repository/health.svg)

```
[![Health](https://phpackages.com/badges/taylornetwork-laravel-repository/health.svg)](https://phpackages.com/packages/taylornetwork-laravel-repository)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k29](/packages/ronasit-laravel-helpers)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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