dyndns/app/Console/Commands/SyncDomain.php

41 lines
669 B
PHP
Raw Normal View History

2019-08-10 14:34:53 +00:00
<?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);
}
}