https://github.com/iftekhersunny/icondirective
The icon directive provides @icon directive to use fontawesome icon in the blade template
https://github.com/iftekhersunny/icondirective
Last synced: 5 months ago
JSON representation
The icon directive provides @icon directive to use fontawesome icon in the blade template
- Host: GitHub
- URL: https://github.com/iftekhersunny/icondirective
- Owner: IftekherSunny
- License: mit
- Created: 2016-09-01T14:24:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-01T15:51:25.000Z (over 8 years ago)
- Last Synced: 2024-11-21T00:07:31.186Z (6 months ago)
- Language: PHP
- Homepage: https://packagist.org/packages/sun/icon-directive
- Size: 6.84 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Icon Directive
[](https://travis-ci.org/IftekherSunny/IconDirective) [](https://packagist.org/packages/sun/icon-directive) [](https://packagist.org/packages/sun/icon-directive) [](https://packagist.org/packages/sun/icon-directive) [](https://packagist.org/packages/sun/icon-directive)
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
```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.
```html
@icon('github')
```Optionally, you can add extra classes for the fontawesome icon.
```html
@icon('github', 'fa-5x', 'blue')
```## Example
In the blade template
```html
@icon('save') Save
```
This code snippet will render as shown below
```html
Save
```
## License
This package is licensed under the [MIT License](https://github.com/iftekhersunny/IconDirective/blob/master/LICENSE)