1
votes

I have install a fresh laravel on my machine. while reading tutorials about laravel vue, they already have a vue component named "ExampleComponent.vue" on their machine under

resources/assets/components

but when i look on resources folder i dont have the components folder but when i see the package.json there are vue installed on it as well as vue-router.

I do also have ExampleComponent.vue but in the vendor folder. Am i installed laravel or vue on a wrong way?

4

4 Answers

1
votes

With Laravel 6, JavaScript & CSS scaffolding was moved to a separate package.
https://laravel.com/docs/master/frontend

composer require laravel/ui --dev

See the linked resource for provisioning specific items.

1
votes

Laravel < v6

You should install npm packages

npm install

read Laravel Document: JavaScript & CSS Scaffolding

0
votes

Run these commands step by step in your Dev folder using your Terminal:

  1. composer require laravel/ui

  2. Then here you have to choose which components to install,

    php artisan ui bootstrap or php artisan ui vue or php artisan ui react

  3. npm install

  4. This is the final thing to Run, and the missing Components Folder will be installed.

    npm run dev

    or

  5. Follow this link everything is explained fully. https://laravel.com/docs/master/frontend

0
votes

run these two commands

php artisan ui bootstrap

and then

php artisan ui vue

https://laravel.com/docs/7.x/frontend