I wanted to install a new project of Laravel 8, so I coded this:
laravel new projectname
Then:
composer require laravel/ui
And after that:
php artisan ui bootstrap --auth
And finally:
npm install && npm run dev
but when I load the page login, it shows me this:
So why Bootstrap does not load, however I tried installing it by the command php artisan ui bootstrap --auth
.
And this is also my 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"
}
So what should I do now in order to load Bootstrap for my authentication routes?
I believe you have not installed the Bootstrap itself into your project, so first install it using below Artisan command:
php artisan ui bootstrap
and then run the NPM commands:
npm install
and
npm run dev
and then refresh your page to see the result.