- 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
32 lines
672 B
PHP
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;
|
|
}
|
|
}
|