diff --git a/src/Command/Migrate.php b/src/Command/Migrate.php index 1b6c702..5345155 100644 --- a/src/Command/Migrate.php +++ b/src/Command/Migrate.php @@ -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 { diff --git a/src/Command/ScrapeWebsite.php b/src/Command/ScrapeWebsite.php index 1c094b6..6b07b5c 100644 --- a/src/Command/ScrapeWebsite.php +++ b/src/Command/ScrapeWebsite.php @@ -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,