Return account number and nameservers for Domains

This commit is contained in:
Deon George 2022-08-10 15:17:16 +10:00
parent 379f20590e
commit f5bec882f5
2 changed files with 11 additions and 0 deletions

View File

@ -96,6 +96,7 @@ final class API
switch($x=curl_getinfo($request,CURLINFO_HTTP_CODE)) {
case 400:
case 401:
case 404:
dump([$xx=curl_getinfo($request),'response'=>$response]);

View File

@ -2,6 +2,7 @@
namespace Dreamscape\Models;
use Illuminate\Support\Collection;
use Jenssegers\Model\Model;
/*
@ -62,4 +63,13 @@ use Jenssegers\Model\Model;
final class Domain extends Model
{
public function getAccountAttribute(): string
{
return $this->customer_id ? sprintf('M%s',$this->customer_id) : '';
}
public function nameservers(): Collection
{
return collect($this->name_servers)->pluck('host');
}
}