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)]
|
2024-06-18 14:54:44 +02:00
|
|
|
public FieldCollection $fields,
|
|
|
|
public ?string $intro
|
2024-03-07 00:58:14 +01:00
|
|
|
) {
|
|
|
|
}
|
|
|
|
}
|