laravel/wayfinder
Generates fully typed, importable TypeScript functions from your Laravel routes and controllers. Call backend endpoints like normal TS functions—no hardcoded URLs or manual syncing. Includes an Artisan generator and Vite plugin for auto-regeneration.
useForm.submit() and Link components, reducing boilerplate for form submissions and navigation.route:cache and Vite’s HMR, fitting into standard deploy pipelines.composer.json and package.json.route:clear pre-deploy (automatable in CI/CD).--skip-actions/--skip-routes.delete) are renamed to [method]Method in TS, which may require frontend adjustments.--skip-actions for unused controllers.route:clear + wayfinder:generate be automated in deploy scripts?ResourceController) or only traditional controllers?PostController).--skip-actions for others).vite.config.js to include the Wayfinder plugin.wayfinder:generate to build scripts (dev/prod).--skip-actions to exclude legacy clients during transition.{user}/{post} with optional params).composer require laravel/wayfinder
npm install -D @laravel/vite-plugin-wayfinder
vite.config.js with the Wayfinder plugin.wayfinder:generate in package.json scripts:
"scripts": {
"dev": "vite --plugins",
"build": "php artisan route:clear && npm run build:vite",
"build:vite": "vite build"
}
route:clear pre-build in CI/CD (e.g., GitHub Actions, Laravel Forge)..gitignore recommended), but errors require debugging Wayfinder’s logic (e.g., route resolution).--with-form for conventional forms to reduce manual form attribute management.route:list matches generated TS files. Use php artisan wayfinder:generate --verbose for logs.route:clear runs pre-build to avoid stale routes.php artisan route:clear.php artisan wayfinder:generate.--skip-actions for non-critical controllers.APP_URL for baseHow can I help you explore Laravel packages today?