*/ public function toArray(Request $request): array { return [ 'domain_name' => $this->domain_name, 'records' => $this->records ? new DomainNSCollection($this->records) : [ 'items' => [], 'pagination' => [ 'total' => 0, 'per_page' => 0, 'current_page' => 1, 'last_page' => 1, ], ], ]; } }