PHPackages                             zakariadev000/laravel-crud-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. zakariadev000/laravel-crud-generator

ActiveLibrary

zakariadev000/laravel-crud-generator
====================================

Generate full CRUD (Model, Migration, Controller, Request, Resource, Repository, Service, Routes, Tests) with a single artisan command

v1.0.0(1mo ago)01↑2900%1MITPHPPHP ^8.2

Since Apr 5Pushed 1mo agoCompare

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

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

Laravel CRUD Generator
======================

[](#laravel-crud-generator)

[![Laravel 12+](https://camo.githubusercontent.com/2c3c8e91a3f0bca708c77b11d1eeaab0292356b823054f95866653594ff8a1d6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322532422d7265642e737667)](https://laravel.com)[![PHP 8.2+](https://camo.githubusercontent.com/0f16581d1180dbfd4c0e13166ec1267d4ad2f2fab8281ea6d6b284cf5c65d921/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c75652e737667)](https://php.net)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

Generate a complete CRUD stack (Model, Migration, Controller, FormRequest, Resource, Repository, Service, Routes, Tests, Factory, Seeder) with a single artisan command.

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

[](#installation)

```
composer require zakariadev000/laravel-crud-generator --dev
```

Publish the config file:

```
php artisan vendor:publish --tag=crud-generator-config
```

Optionally publish stubs for customization:

```
php artisan vendor:publish --tag=crud-generator-stubs
```

Quick Start
-----------

[](#quick-start)

```
php artisan make:full-crud Product --fields="name:string,price:decimal,description:text,category_id:foreignId,is_active:boolean"
```

This generates all 11 files in the right directories, ready to use.

Command Usage
-------------

[](#command-usage)

```
# Generate everything with default fields
php artisan make:full-crud Product

# With field definitions
php artisan make:full-crud Product --fields="name:string,price:decimal,description:text,category_id:foreignId,is_active:boolean"

# Selective generation
php artisan make:full-crud Product --no-tests --no-repository
php artisan make:full-crud Product --only=model,migration,controller

# Options
php artisan make:full-crud Product --api           # API only (no views)
php artisan make:full-crud Product --soft-deletes   # Add soft deletes
php artisan make:full-crud Product --force          # Overwrite existing files
```

All Options
-----------

[](#all-options)

OptionDescription`--fields=`Field definitions (`name:type,name:type`)`--api`API-only mode`--soft-deletes`Add SoftDeletes trait and migration column`--force`Overwrite existing files`--no-tests`Skip test generation`--no-repository`Skip repository generation`--no-service`Skip service generation`--no-factory`Skip factory generation`--no-seeder`Skip seeder generation`--no-routes`Skip route generation`--only=`Only generate specific components (comma-separated)Supported Field Types
---------------------

[](#supported-field-types)

TypeMigrationValidationFaker`string``string()``required|string|max:255`Context-aware (name, email, etc.)`text``text()``required|string|max:65535``paragraph()``integer``integer()``required|integer``numberBetween()``bigInteger``bigInteger()``required|integer``numberBetween()``decimal``decimal(10,2)``required|numeric|min:0``randomFloat()``boolean``boolean()``sometimes|boolean``boolean()``date``date()``required|date``date()``datetime``dateTime()``required|date``dateTime()``json``json()``required|array``[]``foreignId``foreignId()->constrained()``required|integer|exists:table,id`Related factoryGenerated Files
---------------

[](#generated-files)

For `php artisan make:full-crud Product`:

```
app/
  Models/Product.php
  Http/
    Controllers/ProductController.php
    Requests/
      StoreProductRequest.php
      UpdateProductRequest.php
    Resources/
      ProductResource.php
      ProductCollection.php
  Repositories/ProductRepository.php
  Services/ProductService.php
database/
  migrations/xxxx_create_products_table.php
  factories/ProductFactory.php
  seeders/ProductSeeder.php
routes/api.php  (appended)
tests/Feature/ProductTest.php

```

Configuration
-------------

[](#configuration)

```
// config/crud-generator.php
return [
    'defaults' => [
        'model' => true,
        'migration' => true,
        'controller' => true,
        'form_request' => true,
        'api_resource' => true,
        'repository' => true,
        'service' => true,
        'routes' => true,
        'tests' => true,
        'factory' => true,
        'seeder' => true,
    ],
    'api_prefix' => 'api/v1',
    'namespace' => 'App',
    'pattern' => 'repository-service',
    'soft_deletes' => false,
    'timestamps' => true,
    'pagination' => 25,
];
```

Architecture
------------

[](#architecture)

The generated code follows the **Repository-Service** pattern:

```
Controller -> Service -> Repository -> Model

```

- **Controller**: Handles HTTP, delegates to Service
- **Service**: Business logic, orchestration
- **Repository**: Data access, queries, filtering
- **Model**: Eloquent model with fillable, casts, relationships

Customizing Stubs
-----------------

[](#customizing-stubs)

After publishing stubs, edit them in `resources/stubs/vendor/crud-generator/`. Available placeholders:

- `{{ namespace }}` - App namespace
- `{{ model }}` - Model class name
- `{{ variable }}` - Camel case model name
- `{{ table }}` - Snake case plural table name
- `{{ fillable }}` - Fillable array
- `{{ casts }}` - Casts array
- `{{ columns }}` - Migration columns
- `{{ rules }}` - Validation rules
- `{{ fields }}` - Resource fields

Contributing
------------

[](#contributing)

1. Fork the repo
2. Create a feature branch (`git checkout -b feature/amazing`)
3. Commit your changes
4. Push to the branch
5. Open a Pull Request

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/152384244?v=4)[Zakaria Dev](/maintainers/ZakariaDev000)[@ZakariaDev000](https://github.com/ZakariaDev000)

---

Top Contributors

[![zakbot-agent](https://avatars.githubusercontent.com/u/270637449?v=4)](https://github.com/zakbot-agent "zakbot-agent (1 commits)")

### Embed Badge

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

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

198277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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