Fields

Position

Extends Preview

  • has the same features

The Position field allows you to create numbering for iterating elements.

use MoonShine\Fields\Json;
use MoonShine\Fields\Position;
use MoonShine\Fields\Switcher;
use MoonShine\Fields\Text;
 
//...
 
public function fields(): array
{
return [
Json::make('Product Options', 'options')
->fields([
Position::make(),
Text::make('Title'),
Text::make('Value'),
Switcher::make('Active')
])
];
}
 
//...

json_fields
json_fields_dark