forge/app/Http/Resources/SptVersionResource.php
2025-01-30 20:49:56 -05:00

32 lines
687 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Resources;
use App\Models\SptVersion;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Override;
/** @mixin SptVersion */
class SptVersionResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
#[Override]
public function toArray(Request $request): array
{
return [
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'id' => $this->id,
'version' => $this->version,
'color_class' => $this->color_class,
];
}
}