PHPackages                             khaledweka/repository-generator - 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. khaledweka/repository-generator

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

khaledweka/repository-generator
===============================

A Laravel package to generate repository pattern files based on models

v1.2(1y ago)122MITPHPPHP ^8.0CI failing

Since Apr 22Pushed 1y ago1 watchersCompare

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

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

Laravel Repository Generator
============================

[](#laravel-repository-generator)

A Laravel package to generate repository pattern files based on your models.

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

[](#installation)

1. Install the package via composer:

```
composer require khaledweka/repository-generator
```

Publish the configuration file (optional):

```
php artisan vendor:publish --provider="khaledweka\RepositoryGenerator\RepositoryGeneratorServiceProvider"
```

Usage Generate repository files for a specific model:

```
php artisan make:repository User
```

Generate repository files for all models:

```
php artisan make:repository --all
```

Features Generates contract interfaces for repositories

Generates repository classes that extend BaseRepository

Automatically updates the RepositoryServiceProvider

Follows your existing repository pattern implementation

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

[](#how-to-use)

1. Install the package in your Laravel project
2. Run the command to generate repositories:
    - For a specific model: `php artisan make:repository User`
    - For all models: `php artisan make:repository --all`
3. The package will generate:
    - Contract interface in `app/Repositories/Contracts/`
    - Repository class in `app/Repositories/SQL/`
    - Update the `RepositoryServiceProvider`

Key Features
------------

[](#key-features)

1. Follows your existing repository pattern implementation
2. Generates proper type hints and method signatures
3. Automatically binds contracts to implementations in the service provider
4. Supports generating repositories for all models at once
5. Maintains your existing base repository structure

The package will save you significant time when implementing the repository pattern in your Laravel applications by automating the boilerplate code generation.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance51

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Total

3

Last Release

376d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29121b191532c9926e731fee16ca91d7f34d86d6605e4d786804865f3afe6c72?d=identicon)[khaledweka](/maintainers/khaledweka)

---

Top Contributors

[![khaledweka](https://avatars.githubusercontent.com/u/10676280?v=4)](https://github.com/khaledweka "khaledweka (8 commits)")

### Embed Badge

![Health badge](/badges/khaledweka-repository-generator/health.svg)

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

###  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)
