How to Install and Use Font Awesome Icons in Laravel?
https://www.itsolutionstuff.com/post/how-to-install-and-use-font-awesome-icons-in-laravelexample.html
Last updated
https://www.itsolutionstuff.com/post/how-to-install-and-use-font-awesome-icons-in-laravelexample.html
Last updated
By Hardik Savani June 11, 2020 Category : LaravelPlayUnmuteLoaded: 1.00%FullscreenIn this tute, we will discuss how to install font awesome in laravel. if you have question about how to use fontawesome in laravel then i will give simple example with solution. i explained simply about install font awesome laravel 7. you can see install font awesome in laravel.
In this example, i will show you step by step how to install font awesome icons in laravel mix. i will give you two example of installing font awesome in laravel. one will be using npm command using laravel mix and another example will using cdn js.
You can easily use font awesome icon in laravel 6, laravel 7, laravel 8 and laravel 9 version. so let's see bellow step be step process.
1) Install Using Npm
first, we will install laravel fresh version. so let's run bellow command:
Now, we need to install npm in our new laravel application. so let's simply run bellow command. this command will create "mode_modules" folder in your root directory and store all npm module there.
After that we need to install font awesome library using bellow npm command. so let's run bellow command:
After install successfully, we need to import font awesome css on app.scss file. so let's import as bellow:
resources/sass/app.scss
Now we are ready to run npm dev command, so let's run bellow command:
Here, we will use generated app.css file in our blade file as bellow:
resources/views/welcome.blade.php
Now you can run your application and see on home page. You will get layout as bellow:
2) Install Using CDNJS
here, we will use cdn js file for adding font awesome icons, so let see bellow file code:
resources/views/welcome.blade.php
Read Also: How to Use Bootstrap WYSIHTML5 Editor in Laravel?
I hope it can help you...
Tags :