mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
29 lines
750 B
PHP
29 lines
750 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\Service;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/** @mixin Service */
|
|
class ServiceResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'server_id' => $this->server_id,
|
|
'type' => $this->type,
|
|
'type_data' => $this->type_data,
|
|
'name' => $this->name,
|
|
'version' => $this->version,
|
|
'unit' => $this->unit,
|
|
'status' => $this->status,
|
|
'is_default' => $this->is_default,
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at,
|
|
];
|
|
}
|
|
}
|