PHP code example of pendonl / laravel-fontawesome

1. Go to this page and download the library: Download pendonl/laravel-fontawesome library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pendonl / laravel-fontawesome example snippets


FontAwesome::icon('arrow-up');
// Generates <i class="fa fa-arrow-up"></i>

FontAwesome::icon('arrow-up', ['class' => 'tiny', 'id' => 'MyFirstIcon']);
// Generates <i class="fa fa-arrow-up tiny" id="MyFirstIcon"></i>

use PendoNL\LaravelFontAwesome\LaravelFontAwesome;

$fa = new LaravelFontAwesome();
$icon = $fa->icon('arrow-up', ['class' => 'tiny', 'id' => 'MyFirstIcon']);

// config/app.php
'providers' => [
    ...
    PendoNL\LaravelFontAwesome\LaravelFontAwesomeServiceProvider::class,
];

// config/app.php
'aliases' => [
    ...
    'FontAwesome' => PendoNL\LaravelFontAwesome\Facade::class,
];