laravel/wayfinder
Zero‑friction Laravel → TypeScript bridge. Wayfinder auto‑generates fully typed, importable TS functions for your routes and controller actions, letting you call endpoints like normal functions—no hardcoded URLs, parameter guessing, or manual syncing.
showPost(1) instead of axios.get('/posts/1')), improving DX and reducing boilerplate.action, method) directly from backend routes, ensuring consistency between frontend forms and backend logic.useForm and Link components, enabling zero-config form submissions and navigation."Wayfinder eliminates a major friction point in our Laravel + TypeScript workflow: manual API contract management. Today, every route change requires frontend updates—Wayfinder automates this by generating TypeScript functions for every Laravel endpoint. This reduces bugs from URL mismatches, speeds up development (e.g., deletePost(1) instead of axios.delete('/posts/1')), and aligns our frontend with backend changes in real-time. For Inertia.js apps, it also simplifies form submissions and navigation. The tradeoff is a minor build-step dependency, but the payoff is fewer production issues and faster iteration—especially as our API grows."
ROI:
*"Wayfinder solves two key pain points:
<form> attributes (e.g., action, method) directly from backend routes, ensuring consistency.How it works:
php artisan wayfinder:generate to create TypeScript stubs in resources/js/wayfinder/.import { show } from '@/actions/App/Http/Controllers/PostController';
show(1); // Returns { url: "/posts/1", method: "get" }
useForm and Link components.Tradeoffs:
Next steps:
How can I help you explore Laravel packages today?