PHPackages                             jerodev/laravel-font-awesome - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jerodev/laravel-font-awesome

Abandoned → [blade-ui-kit/blade-icons](/?search=blade-ui-kit%2Fblade-icons)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

jerodev/laravel-font-awesome
============================

A Laravel package that renders Font Awesome icons server-side

v2.0(6y ago)405.1k2[2 PRs](https://github.com/jerodev/laravel-font-awesome/pulls)MITPHP

Since Jun 23Pushed 6y agoCompare

[ Source](https://github.com/jerodev/laravel-font-awesome)[ Packagist](https://packagist.org/packages/jerodev/laravel-font-awesome)[ Docs](https://github.com/jerodev/laravel-font-awesome)[ RSS](/packages/jerodev-laravel-font-awesome/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (5)Versions (11)Used By (0)

> ‼️ This package is no longer maintained.
> I recommend switching to

Font Awesome Blade directives for Laravel
=========================================

[](#font-awesome-blade-directives-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/710d01b7a4917b30a7cbc095c00d828696743d7776541c3d2b898eb5f490e770/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f6465762f6c61726176656c2d666f6e742d617765736f6d652f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/jerodev/laravel-font-awesome)[![License](https://camo.githubusercontent.com/14b4b972d7ac6b04b2895f23323d5f2551607ffae1f84619e463bbe5eb0f5e22/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f6465762f6c61726176656c2d666f6e742d617765736f6d652f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/jerodev/laravel-font-awesome)[![Travis (.com)](https://camo.githubusercontent.com/78df12b76a8bcfc5501f91ae1915fd2a9856c1517fcf94a26cb40d1f710ff73a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f6a65726f6465762f6c61726176656c2d666f6e742d617765736f6d652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/jerodev/laravel-font-awesome)[![StyleCI](https://camo.githubusercontent.com/a6b8973bd7e2f7ca66e3a79b2a43aca02b6262519e3e301e073951a1485e3b46/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139333038383933332f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/193088933)[![Scrutinizer code quality (GitHub/Bitbucket)](https://camo.githubusercontent.com/f0ec7076381594f075681e837f0cf2c5da87e250c6b5b7892dad62711b77c59b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6a65726f6465762f6c61726176656c2d666f6e742d617765736f6d652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jerodev/laravel-font-awesome/?branch=master)

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.

```

@fas('circle')

```

Requirements
------------

[](#requirements)

RequirementVersionPHP&gt;= 7.2Laravel6.x### Laravel 5.x

[](#laravel-5x)

For Laravel 5.6 and up, use version v1.x of this package

Installation
------------

[](#installation)

Install the package using [Composer](https://getcomposer.org/).

```
composer require jerodev/laravel-font-awesome

```

### Service Provider

[](#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\FontAwesomeServiceProvider::class,

```

Usage
-----

[](#usage)

### Middleware

[](#middleware)

> ⚠️ Since version 2.0, the middleware is no longer automatically injected. You will have to add this to the routes where needed.

This package includes a middleware, [`InjectStyleSheet`](src/Middleware/InjectStyleSheet.php), that injects a minimal stylesheet into your views on render.

The middleware can be added to your routes [as documented by Laravel](https://laravel.com/docs/master/middleware#assigning-middleware-to-routes):

```
Route::middleware(InjectStyleSheet::class)->group(static function () {
    // Create routes here.
});
```

### Views

[](#views)

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
```

When using the `@fa()` directive. The package will scan the different Font Awesome libraries and use the first library where it finds the icon.

The order in which the libraries are scanned is `regular`, `brands`, `solid`. But this can be modified in the [configuration](#configuration).

### Parameters

[](#parameters)

The `@fa()` function can take three parameters of which only the first is required.

ParameterTypeDescription`name`stringThe name of the icon`css_class`stringExtra css classes to be appended to the svg output`force_svg_href`boolForce the output to be an [svg href link](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href#use) if possible. Can be useful in loops.Configuration
-------------

[](#configuration)

The package contains a few configuration options that can be modified by first publishing the config file using the command below. This will create a `fontawesome.php` file in your `config` folder.

```
php artisan vendor:publish --provider="Jerodev\LaraFontAwesome\FontAwesomeServiceProvider"

```

KeyTypeDefault valueDescription`libraries`string\[\]`['regular', 'brands', 'solid']`The icon libraries that will be available. This is also the order in which the libraries will be searched for icons.`svg_href`bool`true`Use [svg href links](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href#use) for consecutive icons.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~47 days

Total

9

Last Release

2302d ago

Major Versions

v1.0.5 → v2.0.x-dev2019-12-24

v2.0 → 3.0.x-dev2020-03-07

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3493941?v=4)[Jeroen Deviaene](/maintainers/jerodev)[@jerodev](https://github.com/jerodev)

---

Top Contributors

[![jerodev](https://avatars.githubusercontent.com/u/3493941?v=4)](https://github.com/jerodev "jerodev (63 commits)")[![agravelot](https://avatars.githubusercontent.com/u/13699253?v=4)](https://github.com/agravelot "agravelot (1 commits)")

---

Tags

fontawesome5laravelphplaravelsvgFontAwesome

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jerodev-laravel-font-awesome/health.svg)

```
[![Health](https://phpackages.com/badges/jerodev-laravel-font-awesome/health.svg)](https://phpackages.com/packages/jerodev-laravel-font-awesome)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k9.6k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90128.1k](/packages/emargareten-inertia-modal)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3614.9k](/packages/linkxtr-laravel-qrcode)[wearepixel/laravel-cart

A cart implementation for Laravel

1355.6k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
