Level 50
The route is /user and you are using /users in Link.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello guys! I'm using Inertia-vue. How to implement inertia link in vue?
This is my web route
Route::inertia('/user', 'UserList');
this my sidebar
<Link href="users" class="nav-link">Users</Link>
and this how I add this to the component
import { Link } from '@inertiajs/inertia-vue3'
export default {
setup() {
const user = computed(() => usePage().props.value.auth.user)
return { user }
},
data () {
return {
checkIn: faClipboardCheck,
checkOut: faRightFromBracket,
restaurant: faBowlFood,
billing: faCashRegister,
hotelSetup: faGear,
restaurantSetup: faCogs,
userSetup: faUserGear,
}
},
components: {
FontAwesomeIcon,
Link
}
}
and this is my controller
public function index()
{
$users = User::active()->all();
return Inertia::render('UserList', [
'users' => $users
]);
}
When I click that I got a 404 error
The route is /user and you are using /users in Link.
Please or to participate in this conversation.