RobertBoes / inertia-breadcrumbs

Laravel package to automatically share breadcrumbs to Inertia
MIT License
44 stars 11 forks source link

Not giving any breadcrumbs #20

Open Adiconquerors opened 4 months ago

Adiconquerors commented 4 months ago

I have installed & Setup this package as per instructions and installed Tabuna package

Here is my sample route: Route::get('settings/{slug}/edit', [SettingsController::class, 'edit']) ->breadcrumbs(fn (Trail $trail) => $trail->push('Home', route('home')) );

But it is not giving any route to display in vueJs file.

Iam using Laravel 10 and Vue3

Any additional steps to work this package?

Thanks,

RobertBoes commented 4 months ago

The package should share the breadcrumbs for that route in the breadcrumbs prop. So when you visit /settings/[...]/edit it would share the breadcrumbs for that page. You can use Vue devtools to check if the props are present.

If it's still not working as expected, could you share a minimal reproduction? Preferably a repo with a fresh Laravel app, having a separate commit for the changes you'd make to add the breadcrumbs.

Adiconquerors commented 4 months ago

Hi,

Thanks for the response. I checked in Vue devtools, but there is no props value as you mentioned in readme file

image

RobertBoes commented 4 months ago

Hmm, seems like this is happening because the Tabuba middleware is executed after the middleware from this package. I'll have to see and figure out how to fix it.