Slide
You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.
Extends
Text
* has the same features
Has the same methods as the "Number" field, plus additional methods: step
,
fromField
, toField
Since the range has two values, you have to specify these two fields in the database by means of
fromField
and toField
methods
use MoonShine\Fields\SlideField; //...public function fields(): array{ return [ SlideField::make('Age') ->fromField('age_from') // Field in the table for the value "From" ->toField('age_to') // Field in the table for the value "Before" ->min(0) ->max(60) ->step(1) // Slider pitch ];} //...
