Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function getEndpoint(): string |
||
15 | { |
||
16 | // Retrieve a city's zip code by inputting it's place ID |
||
17 | $query = $this->place_id ?? $this->query; |
||
18 | |||
19 | $endpoint = 'https://maps.googleapis.com/maps/api/place/details/json?placeid='.$query; |
||
20 | $endpoint .= '&language=en_EN'; |
||
21 | $endpoint .= '®ion=us'; |
||
22 | $endpoint .= '&fields=address_component'; |
||
23 | $endpoint .= '&key='.config('google-places.api_key'); |
||
24 | |||
25 | return $endpoint; |
||
26 | } |
||
44 |