2017 © Pedro Peláez
 

library easy-fa

A easy way use icons for phper

image

encore/easy-fa

A easy way use icons for phper

  • Tuesday, October 25, 2016
  • by encore
  • Repository
  • 1 Watchers
  • 4 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Easy FontAwesome

The elegant way to use font-awesome for PHPer., (*1)

Inspired by FontAwesomePHP, (*2)

Installation

composer require encore/easy-fa

Example Usage

To use it in Laravel project, first add service provider in app.php, (*3)

Encore\EasyFontAwesome\FontAwesomeServiceProvider::class,

In views, (*4)


<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>FontAwesome example</title> <!-- import css --> {!! fa_assets() !!} </head> <body> <botton>{!! fa('envelope') !!}</botton> <botton>{!! fa('calendar')->lg() !!}</botton> <botton>{!! fa('camera')->border() !!}</botton> <!-- or --> <botton>@fa('star')</botton> <botton>@fa('calendar', 'lg')</botton> <botton>@fa('camera', 'lg|border')</botton> <botton>@fa('hourglass', 'x2|rotate:180')</botton> </body> </html>

In addition to laravel, you can use it in any PHP project., (*5)


// size echo fa('star')->lg(); echo fa('star')->x2(); echo fa('star')->x3(); echo fa('star')->x4(); echo fa('star')->x5(); // fixed with parent echo fa('star')->fw(); // add border echo fa('star')->border(); // add border and pull left echo fa('star')->border()->left(); // add border and pull right echo fa('star')->border()->right(); // spin echo fa('star')->spin(); // pulse echo fa('star')->spin()->pulse(); // rotate echo fa('star')->rotate(90); echo fa('star')->rotate(180); echo fa('star')->rotate(270); // flip echo fa('star')->flipHorizontal(); echo fa('star')->flipVertical(); // stack echo fa('star')->on(fa('square')); // inverse echo fa('star')->inverse(); // iterat foreach (fa(['book', 'pencil', 'star', 'gear']) as $fa) { echo $fa; }

To find all icons please refer to Font Awesome, (*6)

License

The MIT License (MIT)., (*7)

The Versions

25/10 2016

dev-master

9999999-dev https://github.com/z-song/easy-fa

A easy way use icons for phper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by zsong

icon font awesome

25/10 2016

v0.1.2

0.1.2.0 https://github.com/z-song/easy-fa

A easy way use icons for phper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by zsong

icon font awesome

25/10 2016

v0.1.1

0.1.1.0 https://github.com/z-song/easy-fa

A easy way use icons for phper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by zsong

icon font awesome

24/10 2016

v0.1.0

0.1.0.0 https://github.com/z-song/easy-fa

A easy way use icons for phper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by zsong

icon font awesome