- add title, placeholder and subtitle in avatar component - add role collection in users dto - make show empty text on table by default
23 lines
528 B
PHP
23 lines
528 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Data\Users;
|
|
|
|
use App\Data\Ui\ManageRoles\RoleData;
|
|
use Spatie\LaravelData\Attributes\DataCollectionOf;
|
|
use Spatie\LaravelData\{Data, DataCollection};
|
|
|
|
final class UserData extends Data
|
|
{
|
|
public function __construct(
|
|
public string $name,
|
|
public string $email,
|
|
public bool $active = false,
|
|
|
|
/** @var DataCollection<int, RoleData>|null */
|
|
#[DataCollectionOf(class: RoleData::class)]
|
|
public ?DataCollection $roles = null,
|
|
) {}
|
|
}
|