adrema/app/Form/Data/SectionData.php

22 lines
513 B
PHP
Raw Permalink Normal View History

2024-03-07 00:58:14 +01:00
<?php
namespace App\Form\Data;
use App\Form\Casts\FieldCollectionCast;
use Spatie\LaravelData\Data;
use App\Form\Transformers\FieldCollectionTransformer;
use Spatie\LaravelData\Attributes\WithCast;
use Spatie\LaravelData\Attributes\WithTransformer;
class SectionData extends Data
{
public function __construct(
public string $name,
#[WithCast(FieldCollectionCast::class)]
#[WithTransformer(FieldCollectionTransformer::class)]
public FieldCollection $fields
) {
}
}