PHP code example of nettantra / filament-slider-input-field

1. Go to this page and download the library: Download nettantra/filament-slider-input-field 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/ */

    

nettantra / filament-slider-input-field example snippets


use NetTantra\FilamentSliderInputField\Forms\Components\SliderInput;

// admin panel
    public static function form(Form $form): Form
    {
        return $form->schema([
                    ...
                    SliderInput::make('rating')
                                ->minValue(0)
                                ->maxValue(5)
                                ->step(0.05);
                ]);
     }

//frontend-forms 
    protected function getFormSchema(): array
    {
        return [
            ....
             SliderInput::make('rating')
                        ->minValue(0)
                        ->maxValue(5)
                        ->step(0.05);
        ];
    }