PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, January 19, 2022

[FIXED] How to use font awesome inside laravel Voyager?

 January 19, 2022     font-awesome, fonts, laravel, voyager     No comments   

Issue

is it possible to use font awesome in laravel voyager? If so how do I go about using it?


Solution

You can do that by adding your css from config/voyager.php in additional_css

Install Font Awesome using npm i @fortawesome/fontawesome-free --save-dev

Create laravel mix file resources\sass\font-awesome.scss and import fontawesome file in that mix

//Font Awesome

@import '~@fortawesome/fontawesome-free/scss/fontawesome';

@import '~@fortawesome/fontawesome-free/scss/solid';

@import '~@fortawesome/fontawesome-free/scss/regular';

@import '~@fortawesome/fontawesome-free/scss/brands';

In webpack.mix.js

mix.js('resources/js/app.js', 'public/js')

    .sass('resources/sass/app.scss', 'public/css')

    .sass('resources/sass/font-awesome.scss', 'public/css');

npm run dev compile css file using this command for dev environment

config\voyager.php

'additional_css' => [

    'css/font-awesome.css',

],


Answered By - Apurv Bhavsar
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing