1. Go to this page and download the library: Download guava/filament-icon-picker 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/ */
guava / filament-icon-picker example snippets
use Guava\IconPicker\Forms\Components\IconPicker;
IconPicker::make('icon');
// Make sure this is the correct import, not the filament one
use Guava\IconPicker\Tables\Columns\IconColumn;
$table
->columns([
IconColumn::make('icon'),
])
// ...
;
<x-icon :name="$category->icon" />
IconPicker::make('icon')
->gridSearchResults();
IconPicker::make('icon')
->listSearchResults();
IconPicker::make('icon')
->iconsSearchResults() // With tooltip
->iconsSearchResults(false); // Without tooltip
IconPicker::make('icon')
->dropdown(false);
IconPicker::make('icon')
->sets(['heroicons']);
bash
php artisan filament:assets
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.