yes you can pass inertia.
in short , using laravel and vue is like put your spa front end and api back end at the same domain.
in your welcome.blade.php
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
@vite(['resources/js/app.js','resources/css/app.css'])
</head>
<body class="antialiased">
<div id="app">
</div>
</body>
</html>
routes.php file:
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::any('/{any}', function () {
return view('welcome');
})->where(['any' => '.*']);
app.js
import './bootstrap';
import { createApp } from 'vue'
import App from './App.vue'
import router from './routes'
const app = createApp(App)
app.use(router).mount('#app')
app.vue
<template>
<div>
<router-view />
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
</style>
routes.js
import { createRouter, createWebHistory } from "vue-router"
const routes = [
{
path: '/',
component: () => import('./views/Home.vue'),
name: 'Home',
},
{
path: '/:pathMatch(.*)*',
name: 'NotFound',
component: () => import('./views/NotFound.vue'),
}
]
const router = createRouter({
history: createWebHistory(),
routes,
})
export default router
then write your own home.vue, notfound.vue and other files.
and write your backend code like noraml, you can use api call to fetch data.
because front end and back end are at the same domain, you don't need to setup sanctum anything.