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
I'm using Ziggy version 2 and Laravel 10 with Inertiajs and Vue 3. After run build completed everything is OK, but when run the app with SSR enable. All routes throw errors like TypeError: Cannot read properties of undefined (reading 'home.index') and the app run as normal without SSR.
Here is my Laravel route
Route::get('/', [HomeController::class, 'index'])->name('home.index');
Route::get('/register', [HomeController::class, 'register'])->name('home.register');
Route::get('/about', [AboutController::class, 'index'])->name('about.index');
The text was updated successfully, but these errors were encountered:
Because there's no window in SSR mode, you have to pass Ziggy's config and the current URL from your backend and set those values manually on the frontend. See #432 (comment).
Ziggy version
2.2.1
Laravel version
10.10
Description
I'm using Ziggy version 2 and Laravel 10 with Inertiajs and Vue 3. After run build completed everything is OK, but when run the app with SSR enable. All routes throw errors like
TypeError: Cannot read properties of undefined (reading 'home.index')
and the app run as normal without SSR.Ziggy call and context
Ziggy configuration
Route definition
The text was updated successfully, but these errors were encountered: