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

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

anik/repository-generator
=========================

Repository generator generates repository classes as it requires for repottern package.

1.0.0(9y ago)221MITPHPPHP &gt;=5.5

Since Jul 7Pushed 9y agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Repository generator is a PHP class generator for the [Repository pattern - Repottern](https://github.com/ssi-anik/repottern)
-----------------------------------------------------------------------------------------------------------------------------

[](#repository-generator-is-a-php-class-generator-for-the-repository-pattern---repottern)

Repository generator generates the Repository class that's how it's required for the Repottern. Have a look at [repottern](https://github.com/ssi-anik/repottern)

Requirements:
-------------

[](#requirements)

- Laravel &gt;= 5
- PHP &gt;= 5.5

How to install?
---------------

[](#how-to-install)

1. `composer require anik/repository-generator`
2. Add `Anik\Generator\Providers\RepositoryGeneratorServiceProvider::class` to the providers array in config/app.php
3. After the installation, run `php artisan vendor:publish`. This will copy the config file to Laravel's config directory named `generator.php`

Configuration:
--------------

[](#configuration)

1. namespace: The namespace you want to have for the class.
2. dir: The path the file will be saved
3. model\_namespace: The model namespace, if you want to return from the class on the fly. Don't append any slash.

Usages:
-------

[](#usages)

The artisan console has one mandatory argument and 3 optional arguments.

- Mandatory argument
    1. Class name: The class name you want as a repository. Must be a valid identifier.
- Optional arguments
    1. --dir=dir\_name. if specified, the new class will be created on that directory.
    2. --namespace=namespace. if specified, then class will have that namespace.
    3. --model=model. if specified, will lookup using the config file's model\_namespace. If found, then will be returned from the implemented model() method. Otherwise, will be left blank.

Example:
--------

[](#example)

```
php artisan make:repository UserRepository
php artisan make:repository UserRepository --namespace=Repository
php artisan make:repository UserRepository --model=User
php artisan make:repository UserRepository --namespace=Repository --model=User

```

Note:
-----

[](#note)

*Here, the optional arguments can be used at any position*

*If the --dir argument is specified, then the directory will be created regarding the current path*

License:
--------

[](#license)

Repository Generator is released under the MIT Licence.

Bugs and Issues:
----------------

[](#bugs-and-issues)

Well, I'll always appreciate if you find any bug or issue. Feel free to inform. Anyway, forks are welcomed too.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3597d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7180f132fd7bfbbec2083528838f87996e01a6165ef50e58e2f3fcfccda1a834?d=identicon)[ssi-anik](/maintainers/ssi-anik)

---

Top Contributors

[![ssi-anik](https://avatars.githubusercontent.com/u/2676602?v=4)](https://github.com/ssi-anik "ssi-anik (8 commits)")

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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