virtualwonders/yii2-fontawesome

An asset bundle for Font Awesome icons with Bootstrap 4.

1.0.0 2019-07-03 05:38 UTC

This package is auto-updated.

Last update: 2024-03-29 04:16:59 UTC


README

An asset bundle for Font Awesome icons with Bootstrap 4.

Installation

The preferred way to install this extension is through Composer.

Either run

php composer.phar require --prefer-dist virtualwonders/yii2-fontawesome "*"

or add

"virtualwonders/yii2-fontawesome": "*"

to the require section of your composer.json file.

Usage

Add in the view as follows:

use virtualwonders\fontawesome\FontAwesomeAsset;

FontAwesomeAsset::register($this);

Or, use the minified version:

use virtualwonders\fontawesome\FontAwesomeMinifiedAsset;

FontAwesomeMinifiedAsset::register($this);

It can also be added as a dependency on your AppAsset, as follows:

public $depends = [
    'yii\web\YiiAsset',
    'yii\bootstrap4\BootstrapAsset',
    'yii\bootstrap4\BootstrapPluginAsset',
    'virtualwonders\fontawesome\FontAwesomeAsset'
];