Download the PHP package alkoumi/filament-image-radio-button without Composer
On this page you can find all versions of the php package alkoumi/filament-image-radio-button. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alkoumi/filament-image-radio-button
More information about alkoumi/filament-image-radio-button
Files in alkoumi/filament-image-radio-button
Package filament-image-radio-button
Short Description Filament Form Radio Button But With Images
License MIT
Homepage https://github.com/alkoumi/filament-image-radio-button
Informations about the package filament-image-radio-button
This is Filament Form Radio Button But With Images 💁 🎉
RTL & Dark Mode Supported 🎉
If you want Filament field to choose and select an Image from a group of images with a Radio button This is Image Radio button to replacing traditional radio buttons with images selection.
Installation
You can install the package via composer:
for fiament 4
1- create custom theme Filament Docs
2- then add
@source '../../../../vendor/alkoumi/filament-image-radio-button/resources/views/**/*.blade.php';
to the created theme.
3- Then register the theme in your xxxPanelProvider
->viteTheme('resources/css/filament/main/theme.css')
4- Then npm run build
Important
1- OPTIONS
The radio buttom has options then the scenario Here is you have
Model Report
and you want to choose a design of a report
so options here must return return Report::pluck('file', 'id')->toArray();
the options will be like
[ 1 => report1.jpg , 2 => report2.jpg]
then the user will choose the design.
2- Images
You must define where you stored the images in filesystems
disks
somthing like local
or public
so in this example I am using ->disk('reports')
So the component can find the images files
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'serve' => true,
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
'throw' => false,
],
'reports' => [
'driver' => 'local',
'root' => storage_path('app/public/reports'),
'url' => env('APP_URL') . '/reports',
'visibility' => 'public',
'throw' => false,
],
Usage in basic scenario
Usage in advanced scenario
Screenshots
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Mohamed alkoumi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-image-radio-button with dependencies
filament/filament Version ^3.0|^4.0
spatie/laravel-package-tools Version ^1.15.0