dyndns/app/Console/Commands/SyncDomain.php
2019-08-10 16:34:53 +02:00

40 lines
669 B
PHP

<?php
namespace App\Console\Commands;
use App\Jobs\Updater\IUpdater;
use Illuminate\Console\Command;
class SyncDomain extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = "domain:sync";
/**
* The console command description.
*
* @var string
*/
protected $description = "Test Sync a Domain";
/**
* Execute the console command.
*
*/
public function handle()
{
$domain = $this->ask("Domainname");
$ip = $this->ask("New IP");
$job = app(IUpdater::class);
$job->config($domain, $ip);
dispatch($job);
}
}