The Position field allows you to create numbering for repeating elements.
use MoonShine\UI\Fields\Json;
use MoonShine\UI\Fields\Position;
use MoonShine\UI\Fields\Switcher;
use MoonShine\UI\Fields\Text;
Json::make('Product Options', 'options')
->fields([
Position::make(),
Text::make('Title'),
Text::make('Value'),
Switcher::make('Active')
])
useMoonShine\UI\Fields\Json;
useMoonShine\UI\Fields\Position;
useMoonShine\UI\Fields\Switcher;
useMoonShine\UI\Fields\Text;
Json::make('Product Options', 'options')
->fields([
Position::make(),
Text::make('Title'),
Text::make('Value'),
Switcher::make('Active')
])
use MoonShine\UI\Fields\Json;
use MoonShine\UI\Fields\Position;
use MoonShine\UI\Fields\Switcher;
use MoonShine\UI\Fields\Text;
Json::make('Product Options', 'options')
->fields([
Position::make(),
Text::make('Title'),
Text::make('Value'),
Switcher::make('Active')
])