| Package Data | |
|---|---|
| Maintainer Username: | IftekherSunny | 
| Maintainer Contact: | iftekhersunny@hotmail.com (Iftekher Sunny) | 
| Package Create Date: | 2016-09-01 | 
| Package Last Update: | 2016-09-01 | 
| Home Page: | https://packagist.org/packages/sun/icon-directive | 
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-10-30 03:16:01 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 24 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 7 | 
| Total Watchers: | 1 | 
| Total Forks: | 0 | 
| Total Open Issues: | 0 | 
The icon directive provides @icon directive to use fontawesome icon in the blade template.
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,
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')
In the blade template
<button class="btn btn-primary">
    @icon('save') Save
</button>
This code snippet will render as shown below
<button class="btn btn-primary">
    <i class="fa fa-save" aria-hidden="true"></i> Save
</button>
This package is licensed under the MIT License