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

40 lines
715 B
PHP

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