You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Form action={store()}> accepts Wayfinder route/action objects (url + method), with method spoofing for PUT/PATCH/DELETE, and route params from the bound model.
Wayfinder's form variant (update.form(user) → { action: "/users/1?_method=PUT", method: "post" }). The _method query parameter moves into the hidden field and the other query parameters stay.
a route function (update), called with the form's model
The route's method applies unless method is set. PUT, PATCH and DELETE are spoofed. Tests are in src/core/router.test.tsx, docs in docs/advanced-usage/wayfinder.md.
Decision: there's no Wayfinder package dependency, not even an optional peer. Wayfinder's runtime is generated into the app (resources/js/wayfinder), and @laravel/vite-plugin-wayfinder is a build tool that we never import. The types are structural (RouteDefinition, RouteFormDefinition), so any Wayfinder version that returns { url, method } works. Inertia, by contrast, is an optional peer (#7), because @javaabu/forms/inertia imports it.
Activity
Native Laravel Wayfinder support in Form action
n4ff4h commentedon Nov 4, 2026
Done on
next-gen(19cd33f).<Form action>takes:store()→{ url, method })update.form(user)→{ action: "/users/1?_method=PUT", method: "post" }). The_methodquery parameter moves into the hidden field and the other query parameters stay.update), called with the form'smodelThe route's method applies unless
methodis set. PUT, PATCH and DELETE are spoofed. Tests are insrc/core/router.test.tsx, docs indocs/advanced-usage/wayfinder.md.Decision: there's no Wayfinder package dependency, not even an optional peer. Wayfinder's runtime is generated into the app (
resources/js/wayfinder), and@laravel/vite-plugin-wayfinderis a build tool that we never import. The types are structural (RouteDefinition,RouteFormDefinition), so any Wayfinder version that returns{ url, method }works. Inertia, by contrast, is an optional peer (#7), because@javaabu/forms/inertiaimports it.