1. Go to this page and download the library: Download astrotomic/laravel-dns library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Astrotomic\Dns\Rules\DnsRecordExists;
use Spatie\Dns\Records\A;
use Spatie\Dns\Records\TXT;
return [
'url' => [
'// and a TXT record with the users token
DnsRecordExists::make()
->expect(DNS_A|DNS_AAAA|DNS_CNAME)
->expect(DNS_TXT, fn(TXT $record): bool => $record->txt() === 'token='.$this->user()->public_token),
],
'email' => [
'in
// has an A record
// pointing to our IP-address
DnsRecordExists::make()
->expect(DNS_A, fn(A $record): bool => $record->ip() === '127.0.0.1'),
],
'something' => [
'
use Astrotomic\Dns\Domain;
protected $casts = [
'domain' => Domain::class,
];