[admin] agent allow&deny

This commit is contained in:
xiaomlove
2022-02-25 18:09:31 +08:00
parent e2f30ecf0c
commit 9edbaf49ca
25 changed files with 1420 additions and 28 deletions
+27
View File
@@ -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'))
];
}
}