mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 14:01:08 +03:30
fix some problems
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Media\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class MediaResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'collection_name' => $this->collection_name,
|
||||
'thumbnail' => $this->getUrl('thumbnail'),
|
||||
'mime_type' => $this->mime_type,
|
||||
'file_name' => $this->file_name,
|
||||
'size' => $this->size,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user