1
0

AdminInstance.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Http\Resources;
  3. use Illuminate\Http\Resources\Json\JsonResource;
  4. class AdminInstance extends JsonResource
  5. {
  6. /**
  7. * Transform the resource into an array.
  8. *
  9. * @param \Illuminate\Http\Request $request
  10. * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
  11. */
  12. public function toArray($request)
  13. {
  14. return [
  15. 'id' => $this->id,
  16. 'domain' => $this->domain,
  17. 'software' => $this->software,
  18. 'unlisted' => (bool) $this->unlisted,
  19. 'auto_cw' => (bool) $this->auto_cw,
  20. 'banned' => (bool) $this->banned,
  21. 'user_count' => $this->user_count,
  22. 'status_count' => $this->status_count,
  23. 'last_crawled_at' => $this->last_crawled_at,
  24. 'notes' => $this->notes,
  25. 'base_domain' => $this->base_domain,
  26. 'ban_subdomains' => $this->ban_subdomains,
  27. 'actors_last_synced_at' => $this->actors_last_synced_at,
  28. 'created_at' => $this->created_at,
  29. ];
  30. }
  31. }