php - How To Compile Assets In Laravel 8?

one text

Solution:

After creating the Laravel -v8 project and going into the project directory, use the following commands to add Bootstrap and your desire libraries,

Step 1. Install Laravel/UI

composer require laravel/ui

Step 2. Install Bootstrap in Laravel

php artisan ui bootstrap

Step 3. Install your project's frontend dependencies

npm install

Step 4. Compiling asset

npm run dev

enter image description here

Now you can use Bootstrap’s compiled JS and CSS in your application.

enter image description here

If you want to install more packages for instance for React packages you can use the following command in step 2

php artisan ui react

Source