Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

madprabh's avatar

Ziggy error: 'project' parameter is required for route 'projects.show'

Hey Everyone,

I am using Laravel Jetstream with inertia stack for one of my projects and I am running into a strange error. so here is the scenario.

I have a Projects view which has individual projects and each project card has a link that takes you inside the project, the code is something like this

<jet-nav-link :href="route('projects.show', card.id)" class="font-medium text-cyan-700 hover:text-cyan-900"> {{ route('projects.show', card.id) }} </jet-nav-link>

When I click on the link I get the following error Ziggy error: 'project' parameter is required for route 'projects.show'

In my web.php I have

Route::get('/projects/{project}', [ProjectController::class, 'show'])->name('projects.show');

In my controller I have

public function show(Project $project)
    {
        //
        try {
            return Inertia::render('Problems/Show');
        }
        catch(\Exception $e)
        {

        }
    }

What am I doing wrong?

Thank you for your time in advance!

0 likes
4 replies
tykus's avatar

Is card.id null or undefined?

madprabh's avatar

@tykus thanks for your response When I print this out in my vue component it gives me (depending the project I am clicking on). So it does have value

http://127.0.0.1:8000/projects/1
madprabh's avatar

There is definitely something wrong that I am doing

When I use the default layout AppLayout.vue in my Problems/Show component it works fine, but when I use a new Layout that I have created AppLayoutv2.vue it stops working.

madprabh's avatar

I got the error, I was going wrong in setting active links in my AppLayout which was causing this problem. Thank you for taking the time to debug this @tykus

Please or to participate in this conversation.