DNS for Laravel
Installation
Installation
composer require cboxdk/laravel-dns
The Cbox\LaravelDns\LaravelDnsServiceProvider is registered automatically via
package auto-discovery, and the Dns facade alias is available immediately.
Publish the config
The package works with zero configuration. Publish config/dns.php only when you
want to change the transport, nameserver, timeout, or challenge prefix:
php artisan vendor:publish --tag="dns-config"
See the Configuration reference for every key.
What gets bound
In the container, after registration:
Cbox\Dns\Dns— the front door, a singleton built from config.Cbox\Dns\Contracts\Resolver— the chosen transport (SocketResolverorHttpsResolver), so you can type-hint the contract directly.
use Cbox\Dns\Dns;
public function __construct(private Dns $dns) {}