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