kamilcraft-api/app/Http/Resources/ProjectResource.php
2023-07-30 12:10:23 +02:00

29 lines
727 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ProjectResource extends JsonResource
{
public static $wrap = null;
public function toArray($request): array
{
return [
'id' => $this->id,
'title' => $this->title,
'categories' => $this->categories,
'author' => $this->author,
'images' => $this->images,
'release_date' => $this->release_date,
'update_date' => $this->update_date,
'project_url' => $this->project_url,
'project_version' => $this->project_version,
'description' => $this->description,
];
}
}