2017 © Pedro Peláez
 

library font-awesome

Helper class to build FontAwesome icons

image

digbang/font-awesome

Helper class to build FontAwesome icons

  • Thursday, March 23, 2017
  • by guiwoda
  • Repository
  • 18 Watchers
  • 0 Stars
  • 15,242 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 6 % Grown

The README.md

Digbang/FontAwesome

Fake build status, (*1)

Helper class to create FontAwesome icons with a predefined markup., (*2)

Installation

Download through composer:, (*3)

composer require digbang/font-awesome

Add the service provider and facade to your config/app.php:, (*4)

'providers' => [
    // ...
    Digbang\FontAwesome\FontAwesomeServiceProvider::class,

],

'aliases' => [
    // ...
    'FontAwesome' => Digbang\FontAwesome\Facade::class,
],

Usage

Through the facade

FontAwesome::icon('icon', 'extra-class') // <i class="fa fa-icon extra-class"></i>
// or...
FontAwesome::icon('icon', ['class' => 'extra-class']) // <i class="fa fa-icon extra-class"></i>

Through the helper function

fa('icon', 'extra-class') // <i class="fa fa-icon extra-class"></i>
// or...
fa('icon', ['class' => 'extra-class']) // <i class="fa fa-icon extra-class"></i>

HTML Attributes

You can also add any other attributes to the html. Doing..., (*5)

fa('times', ['title' => 'Delete this!']) // <i class="fa fa-times" title="Delete this!"></i>

Changing the tag

You can change the tag used by the library. Doing..., (*6)

FontAwesome::setTag('span');

fa('edit'); // <span class="fa fa-edit"></span>

Standalone usage

Non-Laravel projects can still use this, but the Facade and helper function won't be available., (*7)

$fa = new Digbang\FontAwesome\FontAwesome;
$fa->setTag('span');
$fa->icon('times', 'text-danger'); // <span class="fa fa-times text-danger"></span>

The Versions

23/03 2017

dev-material-icons

dev-material-icons

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by Guido Contreras Woda

11/11 2016

dev-master

9999999-dev

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by Guido Contreras Woda

11/11 2016

2.2.0

2.2.0.0

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by Guido Contreras Woda

14/07 2016

2.1.0

2.1.0.0

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by Guido Contreras Woda

03/08 2015

2.0.0

2.0.0.0

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by Guido Contreras Woda

13/03 2015

1.0.1

1.0.1.0

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by gcontreras

28/05 2014

1.0.0

1.0.0.0

Helper class to build FontAwesome icons

  Sources   Download

The Requires

 

The Development Requires

by gcontreras