Skip to content

Facade

Facade

Cbox\LaravelDns\Facades\Dns proxies the container-bound Cbox\Dns\Dns front door. Every method is documented with an @method tag so IDEs autocomplete return types.

use Cbox\LaravelDns\Facades\Dns;
use Cbox\Dns\Enums\RecordType;

Lookups

Dns::lookup('example.com', RecordType::A);   // DnsResponse
Dns::follow('www.example.com', RecordType::A); // ResolvedChain (CNAME chain)

DnsResponse exposes ->values(), ->records, ->data() (typed value objects), ->rcode, and helpers like ->isNxDomain().

Ownership verification

Dns::challengeHost('example.com');            // _cbox-challenge.example.com
Dns::verifyDomain('example.com', $token);     // bool, read authoritatively

Propagation

Dns::checkPropagation('www.example.com', RecordType::A, 'example.com');
Dns::checkPropagationAcrossProviders('www.example.com', RecordType::A, 'example.com');

Both return a PropagationReport with the authoritative values, each resolver's view, and an overall PropagationStatus.

Diagnostics, SPF, DNSSEC, tracing

Dns::diagnose('example.com');                 // Report
Dns::spf('example.com');                      // SpfEvaluation
Dns::dnssec()->validate('example.com');       // ValidationResult
Dns::trace('example.com');                    // DelegationTrace (dig +trace)
Dns::traceReverse('93.184.216.34');           // reverse delegation trace

Reaching the seams

Dns::resolver();       // the raw Cbox\Dns\Contracts\Resolver
Dns::authoritative();  // the cache-bypassing AuthoritativeResolver

For the full behaviour of each return type, see the cboxdk/dns documentation.