mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
29 lines
564 B
PHP
29 lines
564 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Resources\V1\Project;
|
|
|
|
use App\Models\Project;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/**
|
|
* @property Project $resource
|
|
*/
|
|
class ProjectResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @return array<string, string|boolean|integer>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->resource->id,
|
|
'name' => $this->resource->name,
|
|
];
|
|
}
|
|
}
|