mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
#591 - sites
This commit is contained in:
28
app/Http/Resources/LoadBalancerServerResource.php
Normal file
28
app/Http/Resources/LoadBalancerServerResource.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\LoadBalancerServer;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/** @mixin LoadBalancerServer */
|
||||
class LoadBalancerServerResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'load_balancer_id' => $this->load_balancer_id,
|
||||
'ip' => $this->ip,
|
||||
'port' => $this->port,
|
||||
'weight' => $this->weight,
|
||||
'backup' => $this->backup,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user