make:controller
Generate a new controller for handling HTTP requests.Examples
Generated File
What It Does
- Creates
src/controllers/<name>.rswith#[handler]attribute - Updates
src/controllers/mod.rsto export the controller
make:action
Generate a new action for encapsulating business logic.Examples
Generated File
What It Does
- Creates
src/actions/<name>.rs - Updates
src/actions/mod.rsto export the action - Action is automatically registered in the DI container
make:middleware
Generate a new middleware for request/response processing.Examples
Generated File
What It Does
- Creates
src/middleware/<name>.rs - Updates
src/middleware/mod.rsto export the middleware
make:error
Generate a custom domain error with HTTP response conversion.Examples
Generated File
What It Does
- Creates
src/errors/<name>.rs - Creates or updates
src/errors/mod.rs - Generates a domain error with automatic HTTP response conversion
Usage
make:task
Generate a new scheduled task for background processing.Examples
Generated File
What It Does
- Creates
src/tasks/<name>.rswithTasktrait implementation - Creates or updates
src/tasks/mod.rsto export the task - Creates
src/schedule.rsfor registering tasks (if not exists) - Creates
src/bin/schedule.rsscheduler binary (if not exists)
Next Steps
After generating, register your task insrc/schedule.rs:
make:inertia
Generate an Inertia.js page component.Examples
Generated Files
Creates a React component infrontend/src/pages/:
generate-types
Generate TypeScript types from RustInertiaProps structs.
Options
Examples
How It Works
Scans your Rust code for structs implementingInertiaProps and generates TypeScript interfaces: