1 minute read

Setup Inertia Middleware

ManekTech(www.manektech.com)

3. Create a new file on resources/views/app.blade.php

Advertisement

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<link href="{{ mix('/css/app.css') }}" rel="stylesheet" /> <script src="{{ mix('/js/app.js') }}" defer></script> @inertiaHead </head> <body> @inertia </body> </html>

4. Setup Inertia Middleware

php artisan inertia:middleware

5. Update your App\Http\Kernel.php

'web' => [ // ... \App\Http\Middleware\HandleInertiaRequests::class, ],

6. Setup Client Side Inertia

npm install @inertiajs/inertia @inertiajs/inertia-vue3 // or yarn add @inertiajs/inertia @inertiajs/inertia-vue3 npm install @inertiajs/progress // or yarn add @inertiajs/progress npm install vue@next

7. Update resources/js/app.js

import { createApp, h } from 'vue'

This article is from: