要设置我的项目,我运行了:
laravel new cms
composer require laravel/ui
php artisan ui:auth
php artisan migrate
但是,当我转到http://cms.test/login时,会显示登录页面:
并因缺少资源而出现两个404错误:
http://cms.test/js/app.js net::ERR_ABORTED 404 (Not Found)
http://cms.test/css/app.css
这些丢失的文件可能是什么原因?
除了.htaccess,favicon.ico,index.php和robot.txt文件之外,我的公共目录是空的,这正常吗?
我的设置有点错误,我大多忘记运行编译app.js和app.css文件所需的npm install和npm run dev命令。
正确的安装命令顺序为:
laravel new cms
cd cms
php artisan migrate
composer require laravel/ui
npm install
php artisan ui vue --auth
npm install && npm run dev