Builder

/laravel-agent:scaffold:app

Full app scaffolding from natural language description

Overview

Generate a complete Laravel application structure from a natural language description. This command creates models, migrations, controllers, views, tests, and all supporting infrastructure.

Usage

/laravel-agent:scaffold:app [app description]

Examples

/laravel-agent:scaffold:app e-commerce store with products, categories, cart, and checkout
/laravel-agent:scaffold:app blog platform with posts, comments, tags, and user profiles
/laravel-agent:scaffold:app project management tool with tasks, milestones, and team members
/laravel-agent:scaffold:app SaaS booking system with appointments, customers, and payments
/laravel-agent:scaffold:app inventory management with products, warehouses, and stock tracking

What Gets Generated

For each entity identified in your description:

  • Migrations - Database schema with relationships
  • Models - Eloquent models with relationships, casts, fillable
  • Controllers - Full CRUD operations
  • Form Requests - Validation rules
  • API Resources - JSON transformations
  • Policies - Authorization rules
  • Views/Pages - Blade or Inertia components
  • Tests - Feature and unit tests
  • Factories - Model factories for testing
  • Seeders - Sample data

Scaffolding Process

Phase Components
1. Foundation Migrations, Models, Factories, Seeders
2. Backend Form Requests, API Resources, Controllers, Services, Policies
3. Frontend Views, Components, Layouts, Assets
4. Features Authentication, Admin Panel, API Docs, Jobs
5. Quality Feature Tests, Unit Tests, Integration Tests

Options

Option Description
--api-only Only generate API (no views)
--admin Include Filament admin panel
--livewire Use Livewire for frontend
--inertia=vue Use Inertia with Vue
--inertia=react Use Inertia with React
--multi-tenant Add tenancy support

Example Output

For /scaffold:app e-commerce with products, categories, cart, orders:

app/
├── Http/
│   ├── Controllers/
│   │   ├── ProductController.php
│   │   ├── CategoryController.php
│   │   ├── CartController.php
│   │   └── OrderController.php
│   ├── Requests/
│   │   ├── Product/
│   │   ├── Category/
│   │   └── Order/
│   └── Resources/
│       ├── ProductResource.php
│       ├── CategoryResource.php
│       └── OrderResource.php
├── Models/
│   ├── Product.php
│   ├── Category.php
│   ├── Cart.php
│   └── Order.php
└── Policies/
    ├── ProductPolicy.php
    └── OrderPolicy.php

database/
├── migrations/
│   ├── create_categories_table.php
│   ├── create_products_table.php
│   ├── create_carts_table.php
│   └── create_orders_table.php
├── factories/
└── seeders/

tests/
├── Feature/
│   ├── ProductTest.php
│   ├── CartTest.php
│   └── OrderTest.php
└── Unit/

See Also