<?php

namespace App\Api\Resources;

use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\Storage;

class ItemResource extends JsonResource
{

    public function toArray($request)
    {
        return [
            'id'    => $this->id,
            'name'  => $this->name,
            'desc'  => $this->desc,
            'desc2'  => $this->desc2,
            'cover' => Storage::url($this->cover),
            'radio' => '1',
        ];
    }

}
