argument('propertyId'); 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(); } Edomizil::scrapePropertyData($property[0]); $this->info('Scraping for property '.$property[0]->property_platform_id.' has ended.'); } }