0

我想安装一个 Laravel 8 的新项目,所以我编写了这个代码:

laravel new projectname

然后:

composer require laravel/ui

在那之后:

php artisan ui bootstrap --auth

最后:

npm install && npm run dev

但是当我加载页面登录时,它显示了这个:

捕获

那么为什么 Bootstrap 没有加载,但是我尝试通过 command 安装它php artisan ui bootstrap --auth

这也是我的package.json

"devDependencies": {
        "axios": "^0.21",
        "bootstrap": "^4.0.0",
        "jquery": "^3.2",
        "laravel-mix": "^6.0.6",
        "lodash": "^4.17.19",
        "popper.js": "^1.12",
        "postcss": "^8.1.14",
        "resolve-url-loader": "^3.1.0",
        "sass": "^1.15.2",
        "sass-loader": "^8.0.0"
    }

那么我现在应该怎么做才能为我的身份验证路由加载引导程序?

4

1 回答 1

0

我相信你还没有将 Bootstrap 本身安装到你的项目中,所以首先使用下面的 Artisan 命令安装它:

php artisan ui bootstrap

然后运行 ​​NPM 命令:

npm install

npm run dev

然后刷新您的页面以查看结果。

于 2021-01-16T16:36:07.267 回答