$model->uuid, 'name' => $model->name, 'first_name' => $model->first_name, 'last_name' => $model->last_name, 'initials' => $model->initials, 'email' => $model->email, 'phone' => $model->phone, 'created_at' => $model->created_at->toIso8601String() ]; } public function includeAvatar(User $model): ?Item { return $model->avatar ? $this->item($model->avatar, new AssetTransformer()) : null; } public function includeRoles(User $model): Collection { return $this->collection($model->roles, new RoleTransformer()); } }