1. Go to this page and download the library: Download laradns/laravel-client 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/ */
laradns / laravel-client example snippets
// .env
LARADNS_ID=AJBUEo3UcmZ0JDPgSCGxwIRrj5TyAU
// config/app.php
'providers' => [
// Other service providers...
LaraDns\Providers\LaraDnsServiceProvider::class,
]
// App/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
$schedule->command('dns:sync')->everyFiveMinutes();
}
// App/Listeners/SiteIpUpdated.php
namespace App\Listeners;
class SiteIpUpdated
{
public function __construct()
{
//
}
public function handle(\LaraDns\Events\SiteUpdated $event)
{
// $event->newIpAddress;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.