0
votes

I added into a test project a new menu item into AppLayout.vue.

<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
    <jet-nav-link :href="route('dashboard')" :active="route().current('dashboard')">
        Dashboard
    </jet-nav-link>
    <jet-nav-link :href="route('vehicles')" :active="route().current('vehicles')">
        Vehicles
    </jet-nav-link>
</div>

Into the routes into web.php I added this:

Route::resource('vehicles', VehiclesController::class);

After run-in rpm run dev, I see only a white page and this error message into the console:

Uncaught (in promise) Error: Ziggy error: route 'vehicles' is not in the route list.

How can I solve this problem?

Thanks for help!

1

1 Answers

0
votes

I find the solution.

<jet-nav-link :href="route('vehicles.index')" :active="route().current('vehicles')">
    Vehicles
</jet-nav-link>