argument('propertyId'); $seed = $this->option('seed'); if($seed){ $property = Property::select('id','property_platform_id')->where('seed_id', $seed)->inRandomOrder()->take(1)->get(); } else { if($propertyId && is_numeric($propertyId)){ $property = Property::select('id','property_platform_id')->where('id', 'like', $propertyId)->get(); }else{ $property = Property::select('id','property_platform_id')->inRandomOrder()->take(1)->get(); } } $data = Edomizil::scrapePropertyData($property[0]); $this->info('Scraping for property '.$property[0]->property_platform_id.' has ended. Here is the result: '.$data); } }