sun/icon-directive

The icon directive provides @icon directive to use fontawesome icon in the blade template
24 7
Install
composer require sun/icon-directive
Latest Version:v1.0.0
PHP:>=5.6.4
License:MIT
Last Updated:Sep 1, 2016
Links: GitHub  ·  Packagist
Maintainer: IftekherSunny

Icon Directive

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

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

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

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

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>

License

This package is licensed under the MIT License

Related Packages

laradic/icon-generator

Generate FontAwesome, Foundation Icons or any custom icon font icons to multiple...

293 3
illuminate3/bootawesome

An easy way to intergrate Twitter Bootstrap with Laravel 4.

40 4
tungpham42/laravel-blade-minify-directive

@minify directive to partially compress HTML.

6 1
sun/task

Sun task helps you to manage your tasks easily.

18 2
zdrojowa/laravel-blade-javascript

A Blade directive to export variables to JavaScript

142 0