PHP code example of tomatophp / filament-icons

1. Go to this page and download the library: Download tomatophp/filament-icons 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/ */

    

tomatophp / filament-icons example snippets


use TomatoPHP\FilamentIcons\Components\IconPicker;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            IconPicker::make('icon')
                ->default('heroicon-o-academic-cap')
                ->label('Icon'),
        ]);
}

use TomatoPHP\FilamentIcons\Components\IconColumn;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            IconColumn::make('icon')
                ->label('Icon'),
        ]);
}

use TomatoPHP\FilamentIcons\Facades\FilamentIcons;

public function boot(): void
{
    FilamentIcons::register('boxicons')
        ->asset('https://unpkg.com/[email protected]/css/boxicons.min.css')
        ->template('<i class="{ ICON }"></i>', 'text-xl', 'text-sm')
        ->icons([
            "bx bx-accessibility",
            "bx bx-add-to-queue",
            "bx bx-adjust"
        ])  
        ->replace(['bx ', 'bxs-', 'bxl-', 'bx-'])
        ->save();
}
bash
php artisan filament-icons:install
bash
php artisan filament-icons:clear
bash
php artisan filament-icons:install
bash
php artisan vendor:publish --tag="filament-icons-views"
bash
php artisan vendor:publish --tag="filament-icons-config"