It looks like your implementation is a bit different then what is in the docs
Vue.prototype.$route = (...args) => route(...args).url()
Not sure if current() doesn't work because of the missing .url() or because there is another issue.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have installed a fresh laravel 8 project, scaffolded auth with jetstream using Inertia and have then added Ziggy to work with Laravel's routing.
If I console.log(Ziggy.namedRoutes) I can see all of my routes, however if I run route().current() it always return undefined.
// web.php
Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
Route::get('dashboard', [DashboardController::class, 'index'])->name('dashboard');
});
// app.js
// As per the Inertia documentation
Vue.prototype.$route = (...args) => route(...args)
// Layout.vue
<template>
Route: {{ $route().current() }}
</template>
Any ideas what I may be doing wrong?
Please or to participate in this conversation.