first
This commit is contained in:
21
modules/Task/Http/Resources/CategoryResource.php
Normal file
21
modules/Task/Http/Resources/CategoryResource.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Task\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class CategoryResource extends JsonResource
|
||||
{
|
||||
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'category_id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'remark' => $this->remark,
|
||||
'cover' => $this->cover_url,
|
||||
'url' => $this->linker,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user