PHP code example of icetalker / filament-picker
1. Go to this page and download the library: Download icetalker/filament-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/ */
icetalker / filament-picker example snippets
public function form(Form $form): Form
{
return $form
->schema([
Picker::make('transport')
->label('Transport')
->options([
'ship' => 'By Sea',
'airplane' => 'By Air',
'truck' => 'By Truck',
])
->icons([
'ship' => 'heroicon-o-home',
'airplane' => 'heroicon-o-paper-airplane',
'truck' => 'heroicon-o-truck',
])
->imageSize(100)
->images([
'ship' => 'https://source.unsplash.com/random/100x100/?ship',
'airplane' => 'https://source.unsplash.com/random/100x100/?airplane',
'truck' => 'https://source.unsplash.com/random/100x100?truck',
])
->default('ship'),
]);
}
Picker::make('transport')
->options([
'ship' => 'By Sea',
'airplane' => 'By Air',
'truck' => 'By Truck',
]);
Picker::make('transport')
->label('Transport')
->options([
'ship' => 'By Sea',
'airplane' => 'By Air',
'truck' => 'By Truck',
])
->icons([
'ship' => 'heroicon-o-home',
'airplane' => 'heroicon-o-paper-airplane',
'truck' => 'heroicon-o-truck',
])
Picker::make('transport')
->label('Transport')
->options([
'ship' => 'By Sea',
'airplane' => 'By Air',
'truck' => 'By Truck',
])
->images([
'ship' => 'https://source.unsplash.com/random/100x100/?ship',
'airplane' => 'https://source.unsplash.com/random/100x100/?airplane',
'truck' => 'https://source.unsplash.com/random/100x100?truck',
]);
Picker::make('transport')
->label('Transport')
->options([
'ship' => 'By Sea',
'airplane' => 'By Air',
'truck' => 'By Truck',
])
->default('ship');
bash
php artisan vendor:publish --tag="filament-picker-view"