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.
 
 
 
 

37 lines
1.1 KiB

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class FileResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return [
"uuid" => $this->uuid,
"original_name" => $this->original_name,
"ext" => $this->ext,
"mimetype" => $this->mimetype,
"width" => $this->width,
"height" => $this->height,
"file_size" => $this->file_size,
"sort" => $this->sort,
"alts" => $this->alts,
"description" => $this->description,
"user_id" => $this->user_id,
"ip" => $this->ip,
"collection_id" => $this->collection_id,
"published_at" => $this->published_at,
"created_at" => $this->created_at,
"updated_at" => $this->updated_at,
"deleted_at" => $this->deleted_at,
];
}
}