Laravel 6.0 app.js仅具有require('.bootstrap');? [英] Laravel 6.0 app.js only has require('.bootstrap');?

查看:27
本文介绍了Laravel 6.0 app.js仅具有require('.bootstrap');?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始学习如何使用 Laravel 服务器,我想使用 Vue .但是在安装 app.js 文件后,其中仅包含 require('/bootstrap'); ,它是否不具有必需的组件和const app字段?/p>

我使用了 npm install npm run watch .我在做什么错了?

解决方案

Laravel 6不再附带前端脚手架,他们将其运送到名为 composer需要laravel/uiPHP的工匠的UI VUE

如果需要身份验证视图,例如 login register

 <代码> php artisan ui vue --auth 

文档

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?

解决方案

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

这篇关于Laravel 6.0 app.js仅具有require('.bootstrap');?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆