Package Data | |
---|---|
Maintainer Username: | lucasruroken |
Maintainer Contact: | lucasjavierjuarez@hotmail.com (lucasruroken) |
Package Create Date: | 2016-08-31 |
Package Last Update: | 2016-09-23 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2025-02-09 15:11:53 |
Package Statistics | |
---|---|
Total Downloads: | 159 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Helper class to create FontAwesome icons with a predefined markup. Bassed on Digbang\FontAwesome
This package allows you to create a facade in your laravel application. But if you want, you can use this package without laravel
$fa = new FontAwesome();
$fa->icon('icon', ['class' => 'extra-class'])
FontAwesome::icon('icon', ['class' => 'extra-class'])
Would result in...
<i class="fa fa-icon extra-class"></i>
You can also add any other attributes to the html. Doing...
$fa->icon('times', ['title' => 'Delete this!'])
would result in...
<i class="fa fa-times" title="Delete this!"></i>
You can change the tag used by the library. Doing...
$fa->setTag('span');
$fa->icon('edit');
would result in...
<span class="fa fa-edit"></span>
Add the service provider and facade to your config/app.php
file:
'providers' => array(
...
'LucasRuroken\FontAwesome\FontAwesomeServiceProvider',
...
);
And add the class alias, so you can call it like \FontAwesome::icon
'aliases' => array(
...
'FontAwesome' => 'LucasRuroken\FontAwesome\Facade',
...
);