### Installing Filament Image Radio Button Plugin (Bash) Source: https://github.com/alkoumi/filament-image-radio-button/blob/main/README.md This command installs the alkoumi/filament-image-radio-button package into your Laravel/Filament project using Composer. It downloads the package and its dependencies. ```bash composer require alkoumi/filament-image-radio-button ``` -------------------------------- ### Basic Usage of ImageRadioGroup in Filament (PHP) Source: https://github.com/alkoumi/filament-image-radio-button/blob/main/README.md This PHP code demonstrates the basic implementation of the ImageRadioGroup component in a Filament form. It requires specifying the disk where images are stored and providing options as an array mapping IDs to image filenames. ```php use Alkoumi\FilamentImageRadioButton\Forms\Components\ImageRadioGroup; ImageRadioGroup::make('report_id') ->disk('reports') ->options(fn () => Report::pluck('file', 'id')->toArray()), ``` -------------------------------- ### Advanced Usage of ImageRadioGroup in Filament (PHP) Source: https://github.com/alkoumi/filament-image-radio-button/blob/main/README.md This PHP code shows a more advanced configuration of ImageRadioGroup. It includes enabling animation, making the field required, setting a custom label, dynamically filtering options based on another field (type_id), and updating another field (reportdesign) when the state changes. It also uses the live() method for dynamic updates. ```php use Alkoumi\FilamentImageRadioButton\Forms\Components\ImageRadioGroup; ImageRadioGroup::make('report_id') ->animation(true) ->required() ->label(__('Report Design')) ->disk('reports') ->options(fn (Get $get) => Report::whereType($get('type_id'))->pluck('file', 'id')->toArray()) ->afterStateUpdated(fn(Get $get, Set $set, ?string $state) => $set('reportdesign', ['report' => Report::find($state), 'date' => explode(' ', $get('report_date'))[0]])) ->live(), ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.