Files
My-KOPKB/be/Modules/ExternalSystem/Transformers/ExternalSystemResource.php
T
ismailmasseran b05e074456 Feature/phone register (#11)
Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local>
Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #11
2026-07-14 12:03:22 +08:00

31 lines
1002 B
PHP

<?php
namespace Modules\ExternalSystem\Transformers;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class ExternalSystemResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'code' => $this->code,
'name' => $this->name,
'description' => $this->description,
'url' => $this->url,
'icon' => $this->icon,
'is_active' => $this->is_active,
'starts_at' => $this->starts_at?->toIso8601String(),
'ends_at' => $this->ends_at?->toIso8601String(),
'opens_in_new_tab' => $this->opens_in_new_tab,
'sso_enabled' => $this->sso_enabled,
'contact_email' => $this->contact_email,
'notes' => $this->notes,
'created_at' => $this->created_at?->toIso8601String(),
'updated_at' => $this->updated_at?->toIso8601String(),
];
}
}