You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aquaculture/app/Http/Resources/CategoreResource.php

26 lines
576 B

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource;
class CategoreResource extends Resource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'name' => (string)$this->title,
'description' => (string)$this->description,
'icon' => (string)$this->icon,
'thumb' => assertUrl((string)$this->thumb),
];
}
}