create_route
Create a route or page in a Stellify project. API routes require both controller and controller_method UUIDs to execute code.
Instructions
Create a route/page. For API routes, you MUST pass BOTH controller AND controller_method UUIDs to wire execution.
IMPORTANT: Both 'controller' (file UUID) and 'controller_method' (method UUID) are required together for API routes to execute code. Without both, the route won't run any code.
Route params like {id} auto-inject into controller method parameters when names match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The UUID of the Stellify project | |
| name | Yes | Route/page name (e.g., "Home", "Counter", "notes.index") | |
| path | Yes | URL path (e.g., "/", "/counter", "/api/notes") | |
| method | Yes | HTTP method | GET |
| type | No | Route type: "web" for pages, "api" for API endpoints, "channels" for WebSocket channels, "view" for Blade views | web |
| controller | No | UUID of the controller file. MUST be provided together with controller_method for API routes to execute code. | |
| controller_method | No | UUID of the method to execute. MUST be provided together with controller for API routes to execute code. | |
| data | No | Additional route data (title, description, element UUIDs) | |
| module | No | Optional module name to group this route with related code (e.g., "blog-posts", "user-auth"). Module is auto-created if it doesn't exist. |