mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
[admin] agent allow&deny
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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'))
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user