In this video, you'll learn how to easily install Bootstrap, FontAwesome, and include custom CSS in your Laravel 11 project. Follow these simple steps:
1. Install Bootstrap:
Run the command `npm install bootstrap` to install Bootstrap in your project.
2. Install FontAwesome:
Use this command to add FontAwesome: `npm install @fortawesome/fontawesome-free`.
3. Verify Installation:
Check the `package-lock.json` file to confirm that both packages have been successfully installed.
4. Configure Vite:
Ensure your settings are correctly configured in the `vite.config.js` file.
5. Include in app.js:
Open `resources/js/app.js` and import Bootstrap and FontAwesome:
import 'bootstrap/dist/js/bootstrap.bundle.min';
import 'bootstrap/dist/css/bootstrap.min.css';
import '@fortawesome/fontawesome-free/css/all.min.css';
6. Build Vite Configurations:
Run `npm run build` to build your project's Vite configurations.
7. Add to Blade File:
Include the following in your Blade file to link your assets:
@vite(['resources/js/app.js'])
Now, you can use Bootstrap components and FontAwesome icons in your project.
Негізгі бет 100% Easy Guide to Installing Bootstrap, FontAwesome, and CSS in Laravel 11
Пікірлер