<?php

namespace App\Http\Resources\Incidents;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class IncidentStudentOptionResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => (int) ($this->resource['id'] ?? 0),
            'name' => $this->resource['name'] ?? null,
        ];
    }
}
