-
Notifications
You must be signed in to change notification settings - Fork 268
Closed
Description
Ziggy version
v1.3.5
Laravel version
v8.54.0
Description
Working on a project with Laravel/Inertia stack (from breeze starter kit). Here is a part of code in app.js
createInertiaApp({
title: (title) => `${title} - ${appName}`,
resolve: (name) => require(`./Pages/${name}.vue`),
setup({ el, app, props, plugin }) {
return createApp({ render: () => h(app, props) })
.use(plugin)
.use(ElementPlus, { locale })
.mixin({ methods: route }) // avoid namespace conflict with Element Plus NaveMenu component
.mount(el);
},
});
I am trying to use composition API on my components. I got 'route() undefined' error if I try using 'ctx.route()'. So my question is how I can use route() helper in setup() to access route params? Thanks!
Ziggy call and context
//Ziggy configuration
//Route definition
//Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels