2024-05-15 00:31:24 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
2024-09-12 13:19:52 -04:00
|
|
|
use App\Models\SptVersion;
|
2024-05-15 00:31:24 -04:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
|
2024-09-12 13:19:52 -04:00
|
|
|
/** @mixin SptVersion */
|
2024-05-15 00:31:24 -04:00
|
|
|
class SptVersionResource extends JsonResource
|
|
|
|
{
|
2024-09-12 13:19:52 -04:00
|
|
|
/**
|
|
|
|
* Transform the resource into an array.
|
|
|
|
*/
|
2024-05-15 00:31:24 -04:00
|
|
|
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,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|