mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-13 03:40:52 +08:00
28 lines
660 B
PHP
28 lines
660 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AgentDenyResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'family_id' => $this->family_id,
|
|
'agent' => $this->agent,
|
|
'peer_id' => $this->peer_id,
|
|
'comment' => $this->comment,
|
|
'name' => $this->name,
|
|
'family' => new AgentAllowResource($this->whenLoaded('family'))
|
|
];
|
|
}
|
|
}
|