Render font awesome icons on the server side with Laravel 5
laravel-font-awesome is a good package which we can use to render awesome icons on the server side.
This is achieved by replacing the icons with their svg counterpart before sending the response to the client.
Install the package using Composer.
composer require jerodev/laravel-font-awesome
The package will be auto-discovered by Laravel. If you disabled auto-discovery, you should add the following provider to your config/app.php file.
To use Font Awesome icons in your view there are a few new blade directives.
// Let the package discover the best library for this icon. @fa('laravel')
// Define the library that should be used. @far('circle') // Regular @fas('circle') // Solid @fab('laravel') // Brands
This post is submitted by one of our members. You may submit a new post here.