Boubou
304
7
Vue

Where to add the css and js in a laravel /Vue SPA?

Posted 8 months ago by Boubou

Hello,

I would like to create a single page application in VUE with Laravel but I am not sure on how to organize my app between the front and backend.

It is my understanding that I first need to create a route in Laravel as:

I have a route in laravel as:

Route::get('/home', '[email protected]')->name('home');

in this file I added:

<router-view></router-view>

Which point to the VUE router.

In vue I created a folder called "layouts" and added 2 layouts there: -FrontEndLayout.vue -BackEndLayout.vue

My question is: I got all the routing working, that's fine, it is just about the css and js resources, where shall I add them? in the 2 above files? Would this make sense in Vue?

Thank you.

Please sign in or create an account to participate in this conversation.