service_retrieve_data
This commit is contained in:
39
dashboard/app/Console/Commands/fetchSourceData.php
Normal file
39
dashboard/app/Console/Commands/fetchSourceData.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user