wayfinder-development

Generates typed TypeScript functions for Laravel routes and controller actions.

Updated Aug 24, 2026
One-click install
npx skills add https://github.com/Mantis-Technology/mantis-laravel --skill wayfinder-development-mantis-technology
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wayfinder-development
Source: https://github.com/Mantis-Technology/mantis-laravel/tree/main/.agents/skills/wayfinder-development
Command: npx skills add https://github.com/Mantis-Technology/mantis-laravel --skill wayfinder-development-mantis-technology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend code calling Laravel backends often relies on hardcoded URL strings that break silently when routes change and lack type safety. This Skill generates typed TypeScript functions for Laravel controllers and routes so frontend calls stay synchronized with the backend. ## Core Features & Use Cases - Typed Route Generation: Run php artisan wayfinder:generate to produce importable functions from @/actions and @/routes with full TypeScript support. - Flexible Call Styles: Use .url(), .get(), .post(), .form(), and query parameter options to build URLs, route objects, or HTML form attributes. - Inertia Integration: Spread store.form() directly into Inertia <Form> components for end-to-end form handling. - Use Case: When wiring a React form to a Laravel PostController@store endpoint, import the generated store function and pass store.form() to the form instead of hardcoding /posts. ## Quick Start Ask the AI to connect your React form to the Laravel PostController store endpoint using Wayfinder typed route functions instead of hardcoded URLs.

Frequently Asked Questions about wayfinder-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate typed route functions for Laravel in TypeScript?▼

Run php artisan wayfinder:generate to create typed functions importable from @/actions and @/routes. Add the --with-form flag for form helpers, or install the Wayfinder Vite plugin to regenerate automatically on route changes.

How do I use Wayfinder with Inertia forms in React?▼

Import the controller action function and spread its .form() result into the Inertia <Form> component, for example <Form {...store.form()}>. This provides the correct action URL and HTTP method without hardcoding.

Does Wayfinder support query parameters and route model binding?▼

Yes, pass a query object as the second argument, such as show(1, { query: { page: 1 } }), to append query strings. Route model binding works with type-safe parameter objects matching your Laravel route signatures.

Why do my Wayfinder TypeScript imports break tree-shaking?▼

Tree-shaking breaks when using default imports instead of named imports. Always import specific functions like import { show, store } from '@/actions/App/Http/Controllers/PostController' so bundlers can eliminate unused code.

When should I not use Wayfinder?▼

Wayfinder is not suited for backend-only tasks since it exists to bridge frontend code with Laravel routes. If your project has no JavaScript or TypeScript frontend consuming Laravel endpoints, route generation provides no benefit.