Laravel 6.0 app.js only has require('.bootstrap');?

懵懂的女人 提交于 2021-02-09 11:53:09

问题


I just started learning how to work with a Laravel server and I want to use Vue. But after installing the app.js file only has require('/bootstrap'); in it, shouldn't it have the required components and the const app field?

I used npm install and npm run watch. What am I doing wrong?


回答1:


Laravel 6 doesn't ship with frontend scaffolding anymore, they shipped that to a new package called Laravel UI so install it and scaffold VueJS

composer require laravel/ui
php artisan ui vue

And if you need the authentication views like login and register

php artisan ui vue --auth

Docs



来源:https://stackoverflow.com/questions/57888300/laravel-6-0-app-js-only-has-require-bootstrap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!