Skip to content

moonshine-software/layouts-field

Repository files navigation

Beta version

Layouts field for MoonShine

Field for repeating groups of fields for MoonShine

Installation

composer require moonshine/layouts-field

Usage

use MoonShine\Layouts\Fields\Layouts;

Layouts::make('Content')
    ->addLayout('Contact information', 'contacts', [
        Text::make('Name'),
        Email::make('Email'),
    ]),
use MoonShine\Layouts\Casts\LayoutsCast;

class Article extends Model
{
    protected $casts = [
        'field' => LayoutsCast::class,
    ];
}