ConsultancyProject1_Auslast.../scraper/app/Console/Commands/scrapeAddSeed.php

42 lines
792 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Seed;
class scrapeAddSeed extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'scrape:add-seed {regionId} {uri}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Scrapes for properties from seeds.';
/**
* Execute the console command.
*/
public function handle()
{
$regionId = $this->argument('regionId');
$uri = $this->argument('uri');
$seed = Seed::create([
'uri' => $uri,
'region_id' => $regionId
]);
$this->info('New Seed created '.$seed);
}
}