{"id":16462167,"url":"https://github.com/digitaldreams/googleplace","last_synced_at":"2026-03-02T06:32:42.542Z","repository":{"id":37548178,"uuid":"101877963","full_name":"digitaldreams/googleplace","owner":"digitaldreams","description":"Google Places API Library. Easy to use and learn","archived":false,"fork":false,"pushed_at":"2024-04-14T09:45:54.000Z","size":48,"stargazers_count":20,"open_issues_count":2,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-14T23:16:54.606Z","etag":null,"topics":["google-places-api","oop","places"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitaldreams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-30T12:24:09.000Z","updated_at":"2024-09-11T09:57:15.000Z","dependencies_parsed_at":"2024-10-11T11:20:47.773Z","dependency_job_id":null,"html_url":"https://github.com/digitaldreams/googleplace","commit_stats":{"total_commits":22,"total_committers":4,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"af7cebf9568ad67474c60f5c1d88366588ed6af8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/digitaldreams/googleplace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldreams%2Fgoogleplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldreams%2Fgoogleplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldreams%2Fgoogleplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldreams%2Fgoogleplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaldreams","download_url":"https://codeload.github.com/digitaldreams/googleplace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaldreams%2Fgoogleplace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29994138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-places-api","oop","places"],"created_at":"2024-10-11T11:10:35.947Z","updated_at":"2026-03-02T06:32:42.493Z","avatar_url":"https://github.com/digitaldreams.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP SDK for Google Places APIs \nLocation aware web application uses google-places-api([Place Search](http://github.com), [Place Details](https://developers.google.com/places/web-service/details), [Geocoding](https://developers.google.com/maps/documentation/geocoding/start) , [Distance Matrix](https://developers.google.com/maps/documentation/distance-matrix/start), [Timezone](https://developers.google.com/maps/documentation/timezone/intro), [Elevation](https://developers.google.com/maps/documentation/elevation/start)\n) a lot. They are not linked to each other also its hard to find a easy and time saving php libraray to work with these api. These libraray will need less knowldege about google api and give you flavour of OOP.\n### Setting\nAdd this line on your composer.json\n```javascript\n\"require\":{\n    \"digitaldream/googleplace\":\"1.*\"\n}\n```\nYou need to set your google api keys on top of your page. Like below\n```php\n   \\GooglePlace\\Request::$api_key = 'YOUR_GOOGLE_PLACES_API_KEY';\n ```\n \n### Nearby Search\nA Nearby Search lets you search for places within a specified area. For example you can search all the Restaurents of your city.\n```php\n   $rankBy = new \\GooglePlace\\Services\\Nearby([\n            'location' =\u003e '23.823168,90.367728',\n            'rankby' =\u003e 'distance',\n            'type' =\u003e 'bank'\n        ]\n    );\n    $rankBy-\u003eplaces(); // it will return \\Collection each contains a object of GooglePlace\\Services\\Place\n    /* Google Return 60 places divide by 20 each request.\n     To get next 20 result you have to call nextPage method.\n     */\n     print_r($rankBy-\u003enextPage()); // it will return \\GooglePlace\\Response\n```\n### Text Search\nText Search Service is a web service that returns information about a set of places based on a string — for example \"pizza in New York\" \n\n```php\n  $textSearch = new \\GooglePlace\\Services\\TextSearch([\n  'query' =\u003e 'Restaurants in Mirpur'\n  ]);\n   $places = $textSearch-\u003eplaces(); //same as nearby\n```\n### Place Details\nA Place Details request returns more comprehensive information about the indicated place such as its complete address, phone number, user rating and reviews. You need to pass place_id or a reference from a Place Search\n\n```php\n$place=new \\GooglePlace\\Services\\Place([\n 'placeid'=\u003e'any place id'\n]);\n$place-\u003eget();\necho $place-\u003eaddress();\necho $place-\u003ephone();\nprint_r($place-\u003ephotos()); // returns Collection each contains a GooglePlace\\Helpers\\PlacePhoto object\nprint_r($place-\u003ereviews()); // return Collection\nprint_r($place-\u003etimezone(true)); // return  Timezone API response\nprint_r($place-\u003edistance($place2)); // return Distance Matrix API response\nprint_r($place-\u003eelevation()); // return Elevation API response\n```\n### Geocoding\nYou can get places by a place name or latitude and longitude.\n```php\n $geocoding = new \\GooglePlace\\Services\\Geocoding([\n        'address' =\u003e 'House 13,Road 10,Section 11,Mirpur,Dhaka'\n    ]);\n    print_r($geocoding-\u003eplaces());\n    \n  $reverseGeocoding=   new \\GooglePlace\\Services\\Geocoding([\n        'address' =\u003e  'latlng' =\u003e '23.8163589,90.3709893'\n    ]);\n       print_r($reverseGeocoding-\u003eplaces()); //same as nearby\n```\n### Distance Matrix API\nDistance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations, based on the recommended route between start and end points\n\n```php\n $distanceMatrix = new \\GooglePlace\\Services\\DistanceMatrix([\n        'origins' =\u003e ['Dhaka University, Dhaka'],\n        'destinations' =\u003e ['National University of Bangldesh, Gazipur']]);\n        \n    print_r($distanceMatrix-\u003ecalculate());\n```\n### Timezone API\nTime Zone API provides time offset data for locations on the surface of the earth. The API returns the name of that time zone, the time offset from UTC, and the daylight savings offset.\n```php\n $timezone= new \\GooglePlace\\Services\\Timezone([\n    'location'=\u003e'23.8163589,90.3709893',\n    timestamp=time()\n ])\n $response=$timezone-\u003eget();\n echo $response-\u003etimeZoneId // return Asia/Dhaka\n```\n\n### Elevation API\nGet the altitude(height from sea level in meters) of a given place. \n```php\n$elevation =new \\GooglePlace\\Services\\Elevation([\n    'locations'=\u003e'23.8163589,90.3709893'\n]);\nprint_r($elevation-\u003eget()); \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaldreams%2Fgoogleplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaldreams%2Fgoogleplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaldreams%2Fgoogleplace/lists"}