feature/handle-multiple-countries #45

Merged
krzysiej merged 5 commits from feature/handle-multiple-countries into master 2026-01-17 17:07:40 +01:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit f2a9bdf993 - Show all commits

View File

@@ -76,6 +76,17 @@ class Migrate extends Command
});
}
}
public function createCountriesTable(): void
{
if (!Capsule::schema()->hasTable('countries')) {
Capsule::schema()->create('countries', function (Blueprint $table) {
$table->increments('id');
$table->text('countryName');
$table->text('productsUrl');
$table->timestamps();
});
}
}
public function createStocksTable(): void
{

View File

@@ -75,6 +75,7 @@ class ScrapeWebsite extends Command
$page = 0;
do {
try {
// $res = $this->client->request('POST', 'https://uk.ryobitools.eu/api/product-listing/get-products', [
$res = $this->client->request('POST', 'https://pl.ryobitools.eu/api/product-listing/get-products', [
'form_params' => [
"includePreviousPages" => false,