Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AnwarKamel/462fa2a62bfbbb846570b358e604dd0b to your computer and use it in GitHub Desktop.
Save AnwarKamel/462fa2a62bfbbb846570b358e604dd0b to your computer and use it in GitHub Desktop.
How To Use Font Awesome With Laravel

For some reason there is a whole thread on this seemingly simple tasks. In a bootstrapped Laravel 5.4 instance the following worked for me.

Install Font Awesome with NPM

npm install font-awesome

Import font-awesome in your app.scss file

// resources/assets/sass/app.scss 
// Font Awesome 
@import "node_modules/font-awesome/scss/font-awesome";

Copy fonts to public directory

Add the following to your elixir config in the gulpfile.

.copy('node_modules/font-awesome/fonts', 'public/fonts')

Run Gulp

If you run gulp you should be able to now start using font-awesome everywhere in your app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment