PHP code example of welkervinicius / nova-fa-icon

1. Go to this page and download the library: Download welkervinicius/nova-fa-icon 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/ */

    

welkervinicius / nova-fa-icon example snippets


public function boot()
{
    parent::boot();
    
    Nova::style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css');
}

   'icon_file' => base_path('node_modules/@fortawesome/fontawesome-pro/metadata/icons.json'),
   

   'icon_file' => base_path('resources/icons/custom-icons.json'),
   

use Welkervinicius\NovaFaIcon\NovaFaIcon;

public function fields(Request $request)
{
    return [
        // ...
        NovaFaIcon::make('Icon'),
    ];
}

NovaFaIcon::make('Brand Icon', 'brand_icon')
    ->styles(['brands']), // This will only show icons of the "brands" style.

NovaFaIcon::make('Action Icon', 'action_icon')
    ->styles(['solid', 'regular']), // This will only show solid and regular icons.

use Welkervinicius\NovaFaIcon\NovaFaIcon as FaIcon;

// ...
FaIcon::make('Icon')->styles(['solid']),
bash
php artisan vendor:publish --tag="nova-fa-icon-config"
bash
php artisan vendor:publish --tag="nova-fa-icon-lang"
bash
   php artisan vendor:publish --tag="nova-fa-icon-config"