
1 minute read
Update your App\Http\Kernel.php
ManekTech(www.manektech.com)
import { createInertiaApp } from '@inertiajs/inertia-vue3' import { InertiaProgress } from '@inertiajs/progress'
Advertisement
InertiaProgress.init() createInertiaApp({ resolve: name => require(`./Pages/${name}`), setup({ el, App, props, plugin }) { createApp({ render: () => h(App, props) }) .use(plugin) .mount(el) }, })
8. Update web.php
use Inertia\Inertia;
Route::get('/', function () { return Inertia::render("Home"); });
9. Create new file on resources/js/Pages/Home.vue
<template> <div> Welcome Home! </div> </template>
10. Update webpack.mix.js
mix.js('resources/js/app.js', 'public/js') .vue() .postCss('resources/css/app.css', 'public/css', [ // ]); mix.webpackConfig({ output: { chunkFilename: 'js/[name].js?id=[chunkhash]', } });