PHP code example of dutchcodingcompany / laravel-hetzner-dns-api

1. Go to this page and download the library: Download dutchcodingcompany/laravel-hetzner-dns-api 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/ */

    

dutchcodingcompany / laravel-hetzner-dns-api example snippets




namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use DutchCodingCompany\HetznerDnsClient\HetznerDnsClient;

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        HetznerDnsClient::resolveApiTokenUsing(fn () => 'your-token');
    }
}

$records = HetznerDnsClient::records()->all();
// resolves to a Records DTO
bash
php artisan vendor:publish --tag="hetzner-dns-api-config"