PHPackages                             macropay-solutions/laravel-crud-wizard-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. [HTTP &amp; Networking](/categories/http)
4. /
5. macropay-solutions/laravel-crud-wizard-generator

ActiveLibrary[HTTP &amp; Networking](/categories/http)

macropay-solutions/laravel-crud-wizard-generator
================================================

Library for laravel-crud-wizard class generation

2.0.6(5mo ago)55711MITPHPPHP &gt;=8.0.0

Since Mar 5Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/macropay-solutions/laravel-crud-wizard-generator)[ Packagist](https://packagist.org/packages/macropay-solutions/laravel-crud-wizard-generator)[ RSS](/packages/macropay-solutions-laravel-crud-wizard-generator/feed)WikiDiscussions production Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (24)Used By (1)

laravel-crud-wizard-generator
=============================

[](#laravel-crud-wizard-generator)

[![1_9gPPofZEi8eKSFMrEMIF5w7](https://private-user-images.githubusercontent.com/153634237/562818526-b15f8573-c71e-4b64-acf5-e2849ce51446.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM5NDcyODksIm5iZiI6MTc3Mzk0Njk4OSwicGF0aCI6Ii8xNTM2MzQyMzcvNTYyODE4NTI2LWIxNWY4NTczLWM3MWUtNGI2NC1hY2Y1LWUyODQ5Y2U1MTQ0Ni53ZWJwP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMTlUMTkwMzA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmYxMWQ1YzQzNDA1NDk2NDAzZDJhNjUxMjNkNGExZDZmMDQ1ZjgwODhjOTY4NWQwMDFlZTU0N2E0YTBhYWQ0MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.a8qX237h6WmLgESXFfA2Ho62ao5_ehwG_w3hOYaCKA4)](https://private-user-images.githubusercontent.com/153634237/562818526-b15f8573-c71e-4b64-acf5-e2849ce51446.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM5NDcyODksIm5iZiI6MTc3Mzk0Njk4OSwicGF0aCI6Ii8xNTM2MzQyMzcvNTYyODE4NTI2LWIxNWY4NTczLWM3MWUtNGI2NC1hY2Y1LWUyODQ5Y2U1MTQ0Ni53ZWJwP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMTlUMTkwMzA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmYxMWQ1YzQzNDA1NDk2NDAzZDJhNjUxMjNkNGExZDZmMDQ1ZjgwODhjOTY4NWQwMDFlZTU0N2E0YTBhYWQ0MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.a8qX237h6WmLgESXFfA2Ho62ao5_ehwG_w3hOYaCKA4)

[![Total Downloads](https://camo.githubusercontent.com/e7f5b191f137ae6fcbb64d79ceeecfc733978bcd2c718fda1a7609a423733b92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6163726f7061792d736f6c7574696f6e732f6c61726176656c2d637275642d77697a6172642d67656e657261746f72)](https://packagist.org/packages/macropay-solutions/laravel-crud-wizard-generator)[![Latest Stable Version](https://camo.githubusercontent.com/0476718be113fea396c3be9c16c9b1f97352aa271379d64da8bb2a56c307e608/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6163726f7061792d736f6c7574696f6e732f6c61726176656c2d637275642d77697a6172642d67656e657261746f72)](https://packagist.org/packages/macropay-solutions/laravel-crud-wizard-generator)[![License](https://camo.githubusercontent.com/ad44fd92365b3614b25ffd30c86fcf94cbdceae11281533e4ba4506f51d14b07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6163726f7061792d736f6c7574696f6e732f6c61726176656c2d637275642d77697a6172642d67656e657261746f72)](https://packagist.org/packages/macropay-solutions/laravel-crud-wizard-generator)

Library for MaravelQL [laravel-crud-wizard-free](https://github.com/macropay-solutions/laravel-crud-wizard-free) - [laravel-crud-wizard](https://github.com/macropay-solutions/laravel-lumen-crud-wizard) and for [laravel-crud-wizard-decorator-free](https://github.com/macropay-solutions/laravel-crud-wizard-decorator-free) - [laravel-crud-wizard-decorator](https://github.com/macropay-solutions/laravel-lumen-crud-wizard-decorator)

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

[](#installation)

1\. Run composer command:

`composer require macropay-solutions/laravel-crud-wizard-generator --dev`

2\. Register the provider in Lumen/Maravel in bootstrap/app.php

```
if (\env('APP_ENV') === 'local') {
    $app->register(\MacropaySolutions\LaravelCrudWizardGenerator\LaravelCrudWizardGeneratorServiceProvider::class);
}
```

Usage
-----

[](#usage)

` php artisan make:api-resource {resourceName} {--decorated} {--table=} {--connection=} {--composed} {--connectionAsModelFolder}`

This will create a template for **controller**, **service** and **model (with prepopulated columns from DB)** (optionally, with the **--decorated** flag it will create also a **decorator** and **middleware**) and will print instructions on what is left to be done manually.

If connection is not the default one, it can be specified in the command option.

If table is not the snake cased resourceName, then it can be specified in the table option. It is advised to have the table migrated in DB already.

Run just **php artisan make:api-resource** or **php artisan make:api-resource --decorated** for interactive mode that will try to guess the tableName and use default connectionName.

**--composed** flag will generate model and service for composed primary key

Example:

```
php artisan make:api-resource products --decorated
```

```
Created Model: /var/www/html/project/app/Models/Product.php
Created ModelAttributes: /var/www/html/project/app/Models/Attributes/ProductAttributes.php
Created Service: /var/www/html/project/app/Services/ProductsService.php
Created Controller: /var/www/html/project/app/Http/Controllers/ProductsController.php
Created Decorator: /var/www/html/project/app/Decorators/ProductDecorator.php
Created Middleware: /var/www/html/project/app/Http/Middleware/Decorators/ProductsMiddleware.php
---------------------------------------------------------------------------------------------
TODO:
- Fill the Model's properties and relations,
- Fill the ModelAttributes' dock-block property types,
- Fill the ModelRelations' dock-block property-reads,
- Define validations and DbCrudMap in Controller,
- Fill the Decorator,
- Register Middleware decorator as route middleware,
- Use the middleware alias as middleware in your crud route definition for each method.
- Expose resource in DbCrudMap::MODEL_FQN_TO_CONTROLLER_MAP.
---------------------------------------------------------------------------------------------
Thank you for using laravel-crud-wizard-generator
For more details see: https://github.com/macropay-solutions/laravel-crud-wizard-generator
For full cruFd suite: https://laravel-crud-wizard.com

```

---

```
php artisan make:api-resource products-methods-pivot --composed
```

```
Created Model: /var/www/html/project/app/Models/ProductMethodPivot.php
Created ModelAttributes: /var/www/html/project/app/Models/Attributes/ProductMethodPivotAttributes.php
Created Service: /var/www/html/project/app/Services/ProductsMethodsPivotService.php
Created Controller: /var/www/html/project/app/Http/Controllers/ProductsMethodsPivotController.php
---------------------------------------------------------------------------------------------
TODO:
- Fill the Model's properties and relations,
- Fill the ModelAttributes' dock-block property types,
- Fill the ModelRelations' dock-block property-reads,
- Replace composed primary keys id_1, id_2, ... in Model and Service,
- Define validations and DbCrudMap in Controller,
- Expose resource in DbCrudMap::MODEL_FQN_TO_CONTROLLER_MAP.
---------------------------------------------------------------------------------------------
Thank you for using laravel-crud-wizard-generator
For more details see: https://github.com/macropay-solutions/laravel-crud-wizard-generator
For full cruFd suite: https://laravel-crud-wizard.com

```

Note.

If errors appear for creating folders (from docker container for example), create the folders manually or use this command in your project to give permissions to docker container for creating the files: `sudo chown -R www-data:www-data app` and run again the command.

The required folder structure is:

[![img_1.png](img.png)](img.png)

If **--connectionAsModelFolder** flag is used, **--connection=** will be \\ucfirst and used as subfolder for Model and ModelAttributes.

If the command was already ran without the **--decorated** flag, it can be run again with it to generate the decorator and middleware.

License
-------

[](#license)

This package is licensed under the [license MIT](http://opensource.org/licenses/MIT).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance80

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

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

Recently: every ~21 days

Total

23

Last Release

175d ago

Major Versions

1.3.7 → 2.0.02025-05-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/6af9c4a6c1c9fc82963cd8c274cb21a76bc8cf26d47fb39ee186e358160f78a1?d=identicon)[macropay-solutions](/maintainers/macropay-solutions)

---

Top Contributors

[![macropay-solutions](https://avatars.githubusercontent.com/u/153634237?v=4)](https://github.com/macropay-solutions "macropay-solutions (7 commits)")

---

Tags

generatorlaravellaravel-crus-wizardlumenmaravelqllaravelrestgeneratorcrudREST API

### Embed Badge

![Health badge](/badges/macropay-solutions-laravel-crud-wizard-generator/health.svg)

```
[![Health](https://phpackages.com/badges/macropay-solutions-laravel-crud-wizard-generator/health.svg)](https://phpackages.com/packages/macropay-solutions-laravel-crud-wizard-generator)
```

###  Alternatives

[mrdebug/crudgen

Create a Laravel Crud in a few seconds

31826.8k](/packages/mrdebug-crudgen)[jarischaefer/hal-api

Enhances your HATEOAS experience by automating common tasks.

291.4k](/packages/jarischaefer-hal-api)[bjerke/laravel-bread

A boilerplate package for BREAD operations through REST API in Laravel

115.2k](/packages/bjerke-laravel-bread)

PHPackages © 2026

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