laravel-font-awesome is a good package which we can use to render awesome icons on the server side.

laravel font package

This package will render font awesome icons in your views on the server side. This removes the need to add extra JavaScript or webfont resources on the client side and in doing so reduces the size of your website significantly.

This is achieved by replacing the icons with their svg counterpart before sending the response to the client.

Installation

Install the package using Composer.

composer require jerodev/laravel-font-awesome

Service Provider

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.

\Jerodev\LaraFontAwesome\FontAwesomeServviceProvider::class,

Usage

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

Source Code

https://github.com/jerodev/laravel-font-awesome