New-Thanasoft/thanasoft-back/app/Http/Resources/Intervention/InterventionNotificationResource.php
2025-11-11 17:45:58 +03:00

29 lines
806 B
PHP

<?php
namespace App\Http\Resources\Intervention;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class InterventionNotificationResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'intervention_id' => $this->intervention_id,
'channel' => $this->channel,
'destination' => $this->destination,
'payload' => $this->payload,
'status' => $this->status,
'sent_at' => $this->sent_at ? $this->sent_at->format('Y-m-d H:i:s') : null,
'created_at' => $this->created_at->format('Y-m-d H:i:s')
];
}
}