Mark Ciso
Mark Ciso

Reputation: 13

No vue component on fresh installed laravel

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?

Upvotes: 1

Views: 1289

Answers (4)

Siraj Ali
Siraj Ali

Reputation: 604

run these two commands

php artisan ui bootstrap

and then

php artisan ui vue

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

Upvotes: 0

CRUSIFIXSSO
CRUSIFIXSSO

Reputation: 86

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

Upvotes: 0

Mohammad Fanni
Mohammad Fanni

Reputation: 4173

Laravel < v6

You should install npm packages

npm install

read Laravel Document: JavaScript & CSS Scaffolding

Upvotes: 1

matticustard
matticustard

Reputation: 5149

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.

Upvotes: 1

Related Questions