<?php

namespace App\Http\Resources\Inventory;

use Illuminate\Http\Resources\Json\JsonResource;

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