dolalima / laravel-dns-facade
Dns Facade for Laravel framework
1.11.2
2025-02-17 18:54 UTC
Requires
- php: ^8.2
- aws/aws-sdk-php: ^3.325
- cloudflare/sdk: ^1.3.0
Requires (Dev)
- illuminate/support: *
- laravel/laravel: ^11.0
- orchestra/testbench: ^9.9
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2025-03-17 19:13:18 UTC
README
This package provides a DNS facade for the Laravel framework, allowing you to manage DNS records using different DNS providers.
Installation
Install the package via Composer:
composer require dolalima/laravel-dns-facade
Publish the dns provider configuration file:
php artisan vendor:publish --tag=config
Add the service provider to the providers array in config/app.php:
If you are using Laravel 5.5 or later, you can skip this step, as the package will be auto-discovered.
'providers' => [ // Other service providers... Dolalima\Laravel\Dns\Providers\DnsServiceProvider::class, ],
Configuration
After publishing the configuration file, you can configure the package by editing the config/dns.php file.
List Zones
use Dolalima\Laravel\Dns\Facades\Dns; $zones = Dns::zones(); or Dns::provider('cloudflare')->zones();
Find Zone
use Dolalima\Laravel\Dns\Facades\Dns; $zone = Dns::zone('example.com');
List Records
use Dolalima\Laravel\Dns\Facades\Dns; $zone = Dns::zone('example.com'); $records = Dns::records($zone); or $records = $zone->records();
Create Record
use Dolalima\Laravel\Dns\Facades\Dns; $zone = Dns::zone('example.com'); $record = Dns::create($zone, 'A', 'www');
Delete Record
use Dolalima\Laravel\Dns\Facades\Dns; $zone = Dns::zone('example.com'); $result = Dns::delete($zone,'www');
Abilities
- List Zones
- Find Zone
- List Records
- Create Record
- Update Record
- Delete Record
Available DNS Drivers
- AWS Route 53
- Cloudflare
- DigitalOcean (not implemented yet)
- Google Cloud DNS (not implemented yet)