Home > Blockchain >  How to use font awesome inside laravel Voyager?
How to use font awesome inside laravel Voyager?

Time:11-30

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

CodePudding user response:

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',

],
  • Related