regnilk/fa-laravel

Laravel component for FontAwesome integration with Blade

1.1.4 2020-12-15 20:53 UTC

This package is auto-updated.

Last update: 2024-05-29 05:02:05 UTC


README

Laravel component for FontAwesome integration with Blade

Name Latest stable release Name

Total Download GitHub Watchers GitHub Stars GitHub Followers

License php php

Note : This package is to be used with Laravel version 8

Installation

Install the package via Composer:

    $ composer require regnilk/fa-laravel

The package service provider will be registered automatically.

Configuration

You need to publish the configuration file to set the icons you need

    php artisan vendor:publish --provider="Regnilk\FaLaravel\FaServiceProvider"

Then edit the array returned in app/config/fa-laravel.php this way :

    return [
        "ok"    => "fas fa-check",
        "close" => "fas fa-times"
    ];

It will provide you a dictionary of icons shortcuts.

Usage

To display an icon, just call it this way :

    <x-fa icon="ok" />

You can customize this component like any other :

    <x-fa icon="close" class="text-danger" style="font-weight: bold;" title="Click here to close" />

Contact

Please use GitHub for making comments or suggestions or to report bugs.

License

Fa-Laravel written by Regnilk and released under the MIT License.

Copyright

Copyright © 2020 Regnilk