39 lines
786 B
PHP
39 lines
786 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use App\Http\Controllers\CountryCompareController;
|
|
|
|
class IkeaPrices extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'ikea:prices {article}';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Get Ikea Prices';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function handle(CountryCompareController $countryCompareController)
|
|
{
|
|
$article = $this->argument('article');
|
|
$responses = $countryCompareController->makeRequests($article);
|
|
$prices = $countryCompareController->processResponse($responses,$article);
|
|
//dd($prices);
|
|
return 0;
|
|
}
|
|
}
|
|
|