🇮🇷 فارسی

Laravel Scaffolder

Scaffold Laravel modules in minutes

Generate controllers, DTOs, services, repositories, requests, resources, policies, tests, and documentation from a single Artisan command. Ship consistent modules with explicit, editable Laravel code and a predictable project structure.

What you get out of the box

  • Describe your fields once and generate repositories, services, DTOs, form requests, resources, policies, actions, tests, and API documentation with consistent naming.
  • Keep controllers lean with generated service/action layers, validation requests, and API resource wiring that follow Laravel conventions.
  • Publish the stubs when you want to tailor namespaces, logging, localisation, or other project conventions.

Quick start

Install the package

```bash composer require efati/laravel-scaffolder ```

The service provider registers the make:module command automatically after installation.

Generate a module

```bash php artisan make:module Product \ --api --requests --tests \ --fields="name:string,price:decimal(10,2),is_active:boolean" ```

Controllers, resources, DTOs, repositories, services, and feature tests can be scaffolded in a single pass.

Core Features

  • Repository Pattern – Generated Eloquent repositories and contracts
  • Service Layer – Business logic separation with dependency injection
  • Data Transfer Objects – Explicit DTOs generated from module metadata
  • Form Requests – Validation rules inferred from schema information
  • API Resources – JSON resource generation for API modules
  • Policies – Optional CRUD authorization policies
  • Feature Tests – Generated test scaffolding for module endpoints
  • Actions Layer – Invokable action classes for focused operations
  • OpenAPI Docs – Swagger/OpenAPI generation for APIs
  • Jalali Support – Goli helpers, Eloquent date casting, and Persian date formatting
  • Smart Stubs – Publishable templates for project-specific conventions

Keep exploring