--- name: wayfinder-development description: >- Activates whenever referencing backend routes in frontend components. Use when importing from @/actions or @/routes, calling Laravel routes from TypeScript, or working with Wayfinder route functions. --- @php /** @var \Laravel\Boost\Install\GuidelineAssist $assist */ @endphp # Wayfinder Development ## When to Apply Activate whenever referencing backend routes in frontend components: - Importing from ___SINGLE_BACKTICK___@/actions/___SINGLE_BACKTICK___ or ___SINGLE_BACKTICK___@/routes/___SINGLE_BACKTICK___ - Calling Laravel routes from TypeScript/JavaScript - Creating links or navigation to backend endpoints ## Documentation Use ___SINGLE_BACKTICK___search-docs___SINGLE_BACKTICK___ for detailed Wayfinder patterns and documentation. ## Quick Reference ### Generate Routes Run after route changes if Vite plugin isn't installed: {{ $assist->artisanCommand('wayfinder:generate --no-interaction') }} For form helpers, use ___SINGLE_BACKTICK___--with-form___SINGLE_BACKTICK___ flag: {{ $assist->artisanCommand('wayfinder:generate --with-form --no-interaction') }} ### Import Patterns ___BOOST_SNIPPET_0___ ### Common Methods ___BOOST_SNIPPET_1___ @if($assist->roster->uses(\Laravel\Roster\Enums\Packages::INERTIA_LARAVEL) || $assist->roster->uses(\Laravel\Roster\Enums\Packages::INERTIA_REACT) || $assist->roster->uses(\Laravel\Roster\Enums\Packages::INERTIA_VUE) || $assist->roster->uses(\Laravel\Roster\Enums\Packages::INERTIA_SVELTE)) ## Wayfinder + Inertia @if($assist->inertia()->hasFormComponent()) Use Wayfinder with the ___SINGLE_BACKTICK___