seed = $seed; } /** * Execute the job. */ public function handle(): void { // $response = Http::get($seed->uri); dump($seed->uri); $response = Http::get('https://diani.xyz/test.json'); $json = $response->json(); foreach($json['offers'] as $offer){ $property = Property::firstWhere('property_platform_id', $offer['id']); if($property && $property->check_data === implode(',', $offer['geoLocation'])){ $property->last_found = now(); $property->save(); }else if($property && $property->check_data !== implode(',', $offer['geoLocation'])){ dump('error'); }else{ Property::create([ 'property_platform_id' => $offer['id'], 'seed_id' => $seed->id, 'check_data' => implode(',', $offer['geoLocation']), 'last_found' => now() ]); } } } }