40 lines
801 B
PHP
40 lines
801 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\DataRetrievalService;
|
|
use Illuminate\Console\Command;
|
|
|
|
class fetchSourceData extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'app:fetch-source-data';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Retrieve surveillance data from source database';
|
|
protected $dataRetrievalService;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->dataRetrievalService = new DataRetrievalService();
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle()
|
|
{
|
|
$this->dataRetrievalService->getSurveillanceData();
|
|
}
|
|
|
|
}
|