Skip to content
1.5.2
Command Line / 1.5.2

Code Generation

Andurel generates application-owned code that you can edit after creation.

Generate a resource

Start with a migration, then generate a complete CRUD resource:

1andurel database migrate new create_products_table
2andurel generate scaffold Product

The scaffold includes a model, factory, controller, typed routes, and views. Pass --inertia for pages using the project's configured Inertia adapter, or --api for JSON handlers.

Generate individual parts

1andurel generate model Product
2andurel generate factory Product
3andurel generate controller Product index show
4andurel generate controller Dashboard overview
5andurel generate job SendReceipt
6andurel generate email Receipt

Preview first

Use --dry-run --diff --json before a large generation or update. Generated resource code belongs to the application after creation, while framework-owned internal files are managed by andurel upgrade.

Refresh views and routes

1andurel generate view
2andurel generate routes

The route command generates TypeScript helpers only for Inertia projects.

Documentation

Start typing to search the documentation.