I found a solution, not sure if it's the right one, but it works.
$street = $listing->street;
$house_number = $listing->house_number;
$zip = $listing->zip;
$city = $listing->city;
$coordinates = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($city) . urlencode($zip) . urlencode($street) . urlencode($house_number) . '&sensor=true');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community