Return account number and nameservers for Domains
This commit is contained in:
parent
379f20590e
commit
f5bec882f5
@ -96,6 +96,7 @@ final class API
|
|||||||
|
|
||||||
switch($x=curl_getinfo($request,CURLINFO_HTTP_CODE)) {
|
switch($x=curl_getinfo($request,CURLINFO_HTTP_CODE)) {
|
||||||
case 400:
|
case 400:
|
||||||
|
case 401:
|
||||||
case 404:
|
case 404:
|
||||||
dump([$xx=curl_getinfo($request),'response'=>$response]);
|
dump([$xx=curl_getinfo($request),'response'=>$response]);
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Dreamscape\Models;
|
namespace Dreamscape\Models;
|
||||||
|
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
use Jenssegers\Model\Model;
|
use Jenssegers\Model\Model;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -62,4 +63,13 @@ use Jenssegers\Model\Model;
|
|||||||
|
|
||||||
final class Domain extends 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');
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user