wayfinder-development
Manage type-safe Laravel backend routing within Inertia.js React frontend components using the Wayfinder library.
Introduction
The Wayfinder Development skill facilitates seamless integration between Laravel backend routes and React frontend components in Inertia.js environments. Designed for developers building robust, type-safe applications, it streamlines the process of referencing backend endpoints, handling controller actions, and maintaining route synchronization. By utilizing Wayfinder's ability to generate TypeScript definitions from Laravel routes, this skill helps prevent broken links, enhances developer productivity, and ensures consistent navigation patterns across the application stack.
-
Enables direct imports of controller actions and named routes from @/actions/ and @/routes/.
-
Supports type-safe route object generation, including URL construction, HTTP method handling, and query parameter management.
-
Integrates natively with Inertia.js form components via the .form() method, allowing developers to generate attributes for standard HTML forms directly from backend definitions.
-
Automates the synchronization process through CLI commands like php artisan wayfinder:generate to keep TypeScript types aligned with current Laravel route tables.
-
Facilitates tree-shaking by encouraging named imports rather than default exports, improving bundle size and application performance.
-
Simplifies the creation of complex links, navigation structures, and API calls to backend endpoints while maintaining strict TypeScript standards.
-
Prioritize the use of named imports from @/actions/ or @/routes/ to maintain type safety and benefit from tree-shaking optimizations.
-
Always execute php artisan wayfinder:generate after making changes to routes in the Laravel codebase to ensure frontend type definitions remain accurate.
-
Use the --with-form flag with the generator command when building applications that rely heavily on automated form attribute generation.
-
Leverage the .get(), .post(), .patch(), and .delete() methods provided by the route objects to ensure HTTP verb consistency.
-
If navigation or route resolution fails, verify that the Vite plugin is correctly configured and that route definitions have been regenerated.
-
Integrate with search-docs for deep dives into specific pattern implementations and advanced configuration settings for complex Laravel/Inertia routing scenarios.
Repository Stats
- Stars
- 0
- Forks
- 0
- Open Issues
- 0
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 08:14 PM