39 lines
		
	
	
		
			710 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			710 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Console\Commands;
 | 
						|
 | 
						|
use App\Scraper\Edomizil;
 | 
						|
use Illuminate\Console\Command;
 | 
						|
 | 
						|
class scrapeProperty extends Command
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * The name and signature of the console command.
 | 
						|
     *
 | 
						|
     * @var string
 | 
						|
     */
 | 
						|
    protected $signature = 'scrape:property';
 | 
						|
 | 
						|
    /**
 | 
						|
     * The console command description.
 | 
						|
     *
 | 
						|
     * @var string
 | 
						|
     */
 | 
						|
    protected $description = 'Scrapes for properties from seeds.';
 | 
						|
 | 
						|
    /**
 | 
						|
     * Execute the console command.
 | 
						|
     */
 | 
						|
    public function handle()
 | 
						|
    {
 | 
						|
 | 
						|
        $seeds = Edomizil::getAllSeeds();
 | 
						|
        foreach($seeds as $seed){
 | 
						|
            Edomizil::ScrapeProperty($seed);
 | 
						|
        }
 | 
						|
 | 
						|
        $this->info('Scraping was successfull.');
 | 
						|
 | 
						|
    }
 | 
						|
}
 |