2020-05-27 06:09:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
|
|
|
|
use App\Jobs\BroadbandTraffic as Job;
|
|
|
|
use App\Models\AdslSupplier;
|
|
|
|
|
|
|
|
class BroadbandTraffic extends Command
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name and signature of the console command.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $signature = 'broadband:traffic:import';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
2021-02-17 13:22:50 +00:00
|
|
|
protected $description = 'Import Broadband Traffic from Suppliers';
|
2020-05-27 06:09:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the console command.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
2021-02-17 13:22:50 +00:00
|
|
|
foreach (AdslSupplier::active()->get() as $o)
|
|
|
|
Job::dispatch($o);
|
2020-05-27 06:09:03 +00:00
|
|
|
}
|
|
|
|
}
|