PHPackages                             sun/icon-directive - 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. [Templating &amp; Views](/categories/templating)
4. /
5. sun/icon-directive

ActiveLibrary[Templating &amp; Views](/categories/templating)

sun/icon-directive
==================

The icon directive provides @icon directive to use fontawesome icon in the blade template

v1.0.0(9y ago)724MITPHPPHP &gt;=5.6.4

Since Sep 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/IftekherSunny/IconDirective)[ Packagist](https://packagist.org/packages/sun/icon-directive)[ RSS](/packages/sun-icon-directive/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Icon Directive
--------------

[](#icon-directive)

[![Build Status](https://camo.githubusercontent.com/372224f305c27353dc5e007451c0320c93abaeae6e2a7592a2b5946a9e36fa01/68747470733a2f2f7472617669732d63692e6f72672f496674656b68657253756e6e792f49636f6e4469726563746976652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/IftekherSunny/IconDirective) [![Total Downloads](https://camo.githubusercontent.com/597ef4ebc531f25cca794d5f03ef7bb9d013bb910c81297bdf703042adf5bc4a/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f69636f6e2d6469726563746976652f646f776e6c6f616473)](https://packagist.org/packages/sun/icon-directive) [![Latest Stable Version](https://camo.githubusercontent.com/acc23efde5eaa7de375b137d3515ea2d207ca24152b481c2e742cf56fc193a7e/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f69636f6e2d6469726563746976652f762f737461626c65)](https://packagist.org/packages/sun/icon-directive) [![Latest Unstable Version](https://camo.githubusercontent.com/272fe14d935d73c1beacfb08507ffd7149f181645b536d29d9481e38545ef978/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f69636f6e2d6469726563746976652f762f756e737461626c65)](https://packagist.org/packages/sun/icon-directive) [![License](https://camo.githubusercontent.com/2562d2f1c51dada6f89523350affd3cf971e8f175097eae807f8e21b6c443f2a/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f69636f6e2d6469726563746976652f6c6963656e7365)](https://packagist.org/packages/sun/icon-directive)

The icon directive provides @icon directive to use fontawesome icon in the blade template.

Installation Process
--------------------

[](#installation-process)

Icon directive is available via Composer/Packagist.

```
composer require sun/icon-directive

```

Add the ServiceProvider to the providers array in config/app.php

```
Sun\IconDirective\IconDirectiveServiceProvider::class,
```

Basic Uses
----------

[](#basic-uses)

To add fontawesome icon in your blade template just use @icon directive and pass the fontawesome icon name.

```
@icon('github')
```

Optionally, you can add extra classes for the fontawesome icon.

```
@icon('github', 'fa-5x', 'blue')
```

Example
-------

[](#example)

In the blade template

```

    @icon('save') Save

```

This code snippet will render as shown below

```

     Save

```

License
-------

[](#license)

This package is licensed under the [MIT License](https://github.com/iftekhersunny/IconDirective/blob/master/LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d233b865d7b1e1b86271e3bc70ddd077e1c01e4a83124e020fa39199c4af15a?d=identicon)[IftekherSunny](/maintainers/IftekherSunny)

---

Tags

laravelsuniconFontAwesomedirectiveicon directivefontawesome directivefontawesome icon directive

### Embed Badge

![Health badge](/badges/sun-icon-directive/health.svg)

```
[![Health](https://phpackages.com/badges/sun-icon-directive/health.svg)](https://phpackages.com/packages/sun-icon-directive)
```

###  Alternatives

[spatie/laravel-blade-javascript

A Blade directive to export variables to JavaScript

638855.8k9](/packages/spatie-laravel-blade-javascript)[dirkpersky/typo3-rte-ckeditor-fontawesome

Adds the Fontawesome add-on to the CKEditor in TYPO3.

16147.9k](/packages/dirkpersky-typo3-rte-ckeditor-fontawesome)[angus-mcritchie/blade-boost-directive

Lightning-Fast Blade Components with `@boost` Directive

3910.0k](/packages/angus-mcritchie-blade-boost-directive)

PHPackages © 2026

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