sls/app/Http/Resources/Interview/IceCandidatesResource.php
kushal.saha 3aca6d90f3 feat(webrtc): implement IceCandidateProviderInterface with Metered and ConvexSol drivers
- Add Metered and ConvexSol (CoTURN) provider drivers with response validation and caching
- Add IceCandidateManager with automatic failover and structured logging
- Add IceCandidateProviderInterface and DTOs conforming to RTCIceServer format
2026-08-26 12:44:41 +00:00

32 lines
672 B
PHP

<?php
namespace App\Http\Resources\Interview;
use App\DTOs\IceCandidatesDto;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class IceCandidatesResource extends JsonResource
{
/**
* Disable the default "data" wrapper.
*
* @var string|null
*/
public static $wrap = null;
/**
* Transform the resource into an array.
*
* @return array<int, array<string, mixed>>
*/
public function toArray(Request $request): array
{
if ($this->resource instanceof IceCandidatesDto) {
return $this->resource->toArray();
}
return (array) $this->resource;
}
}