Basic online search with bugs...

This commit is contained in:
2024-02-04 19:35:22 +01:00
parent d1f5810635
commit 354ac8a242
11 changed files with 549 additions and 96 deletions

View File

@@ -13,14 +13,14 @@ class IkeaPrices extends Command
* @var string
*/
protected $signature = 'ikea:prices {article}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get Ikea Prices';
/**
* Execute the console command.
*
@@ -30,9 +30,9 @@ class IkeaPrices extends Command
{
$article = $this->argument('article');
$responses = $countryCompareController->makeRequests($article);
$prices = $countryCompareController->processResponse($responses,$article);
//dd($prices);
return 0;
$products = $countryCompareController->processResponse($responses,$article);
dd($products);
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Http\Controllers\OnlineCompareController;
class OnlineTestCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ikea:online';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*
* @return int
*/
public function handle(OnlineCompareController $onlineCompareController)
{
//$article = $this->argument('article');
$prices = $onlineCompareController->compare();
dd($prices);
return 0;
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Http\Controllers\OnlineCompareController;
class OnlinePrices extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ikea:online';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Online Ikea Prices';
/**
* Execute the console command.
*
* @return int
*/
public function handle(OnlineCompareController $onlineCompareController)
{
//$article = $this->argument('article');
$prices = $onlineCompareController->compare();
dd($prices);
return 0;
}
}