PHPackages                             waad/generate-design-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. waad/generate-design-pattern

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

waad/generate-design-pattern
============================

package to generate repository design pattern dev

310PHP

Since Jan 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/waadmawlood/generate-design-pattern)[ Packagist](https://packagist.org/packages/waad/generate-design-pattern)[ RSS](/packages/waad-generate-design-pattern/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Generate Design Pattern
=======================

[](#generate-design-pattern)

### you can create your restful api easily by using this library

[](#you-can-create-your-restful-api-easily-by-using-this-library)

Installation:
-------------

[](#installation)

Require this package with composer using the following command:

```
composer require waad/generate-design-pattern
```

```
php artisan vendor:publish --provider=Waad\Repository\RepositoryServiceProvider
```

Usage
-----

[](#usage)

##### in Model

[](#in-model)

##### $fillable = \['id',....\];

[](#fillable--id)

##### This is where you will write `sortable`, `filterable` columns

[](#this-is-where-you-will-write--sortable-filterable-columns)

##### in Model

[](#in-model-1)

##### $relations = \['category','post.user'\];

[](#relations--categorypostuser)

##### This is where you will write `relations` column

[](#this-is-where-you-will-write-relations-column)

##### in `app\Providers\AppServiceProvider.php` file

[](#in--appprovidersappserviceproviderphp-file)

```
public function boot()
    {
        $registrar = new \Waad\Repository\Helpers\Routing($this->app['router']);
        $this->app->bind('Illuminate\Routing\ResourceRegistrar', function () use ($registrar) {
            return $registrar;
        });
    }
```

Commands:
---------

[](#commands)

##### full command

[](#full-command)

```
php artisan repo:model User --c --r --m
```

##### or if you have model

[](#or-if-you-have-model)

```
php artisan repo:model User --c --r --model=User
```

##### and you can use `--force` command

[](#and-you-can-use---force-command)

---

#### create validation

[](#create-validation)

```
php artisan repo:validation User
```

### Available command options:

[](#available-command-options)

CommandDescription`--c`Create Controller and linked with repository`--m`Create Model and linked with Controller Functions`--model={ModelName}`Insert model in controller if you have model`--r`Create apiResource Route in api.php`--force`override existing Repository### License

[](#license)

Laravel Design Pattern Generator is free software licensed under the MIT license.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44348636?v=4)[Waad Mawlood](/maintainers/waadmawlood)[@waadmawlood](https://github.com/waadmawlood)

---

Top Contributors

[![waadmawlood](https://avatars.githubusercontent.com/u/44348636?v=4)](https://github.com/waadmawlood "waadmawlood (62 commits)")

### Embed Badge

![Health badge](/badges/waad-generate-design-pattern/health.svg)

```
[![Health](https://phpackages.com/badges/waad-generate-design-pattern/health.svg)](https://phpackages.com/packages/waad-generate-design-pattern)
```

###  Alternatives

[kleiram/transmission-php

PHP Transmission client

18416.9k1](/packages/kleiram-transmission-php)[astrotomic/laravel-dns

327.4k](/packages/astrotomic-laravel-dns)[tuxones/filament-js-money-field

A Laravel Filament plugin for dynamic international currency masking using JavaScript Intl, supporting flexible currency and locale configuration via closures.

144.7k](/packages/tuxones-filament-js-money-field)[mobiosolutions/metatags

A Laravel package to fetch webpage metadata ( Open Graph | Twitter | Facebook | Article ) ect...

231.5k](/packages/mobiosolutions-metatags)

PHPackages © 2026

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