karwan's avatar
Level 22

Vue router to inertia js

Hello everyone Can anyone here help to convert vue router template to laravel inertia vite ?

0 likes
16 replies
Sinnbeck's avatar

Inertia just uses laravel routes, so write them in web.php

karwan's avatar
Level 22

@Sinnbeck sir I have vue router template want to change to inertia vue

1 like
Sinnbeck's avatar

@karwan

Inertia just uses laravel routes, so write them in web.php

So it does not go in vue. Only the calling of the routes..

And is there a question here? Any part you need help with?

Sinnbeck's avatar

@karwan You havent shown anything? But look at the route structure. Write the same in php.. Repeat

Sinnbeck's avatar

An example of a question would be

I have this route written with vue router

{ path: '/about', component: About },

How could I convert this to inertia

karwan's avatar
Level 22

@Sinnbeck no I have template created with vue I want to migrate all files to vue inertia

ImWaller's avatar
{ path: '/about', component: About },

convert to

Route::get('about',  fn() => Inertia::render('About'))->name('about');

Please or to participate in this conversation.