Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 339 Bytes

building_http_query.md

File metadata and controls

14 lines (12 loc) · 339 Bytes

Building HTTP query

$workspace_name = $workspace->name;
$api_key        = config('custom.map_api_key');

$url = 'https://maps.googleapis.com/maps/api/place/textsearch/json?';
$params = [
    'query'     => $workspace_name,
    'sensor'    => 'true',
    'key'       => $api_key
];
$url .= http_build_query($params, '', '&');