_ctx.route #470
-
I'v installed a fresh laravel --jet inertia and i do this // app.js require('./bootstrap'); import { createApp, h } from 'vue'; import route from 'ziggy'; const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel'; createInertiaApp({ InertiaProgress.init({ color: '#4B5563' }); // in webpack.mix.js const mix = require('laravel-mix'); mix.js('resources/js/app.js', 'public/js').vue() if (mix.inProduction()) { mix.webpackConfig({ after that npm run dev removing @route from app.blade and this shown on console.log
***********************/ /****************** app.js:25599
*****************/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to make a separate .use(plugin)
.use(ZiggyVue, Ziggy) And since you're using the Vue plugin you don't need to import the Does that work? |
Beta Was this translation helpful? Give feedback.
You need to make a separate
.use()
call for each Vue plugin, so try this instead:And since you're using the Vue plugin you don't need to import the
route
function directly, so you can removeimport route from 'ziggy';
.Does that work?