Skip to content

Commit

Permalink
Towns of a city method was added
Browse files Browse the repository at this point in the history
  • Loading branch information
Umut KIRGÖZ committed Aug 31, 2020
1 parent 531f49e commit a6d9f5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Fetches the prayer times",
"keywords": ["muslim", "prayer", "Turkey"],
"license": "MIT",
"version": "1.3.4",
"version": "1.3.5",
"authors": [
{
"name": "Umut KIRGÖZ",
Expand Down
5 changes: 5 additions & 0 deletions src/Repositories/LocationsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public function getCities($country, $citySlug = null)
return (null === $citySlug) ? $cities->where('parent_id', $country->id) : $cities->where('slug', $citySlug);
}

public function getCityTowns($city)
{
return $this->data->where('type', 'town')->where('parent_id', $city->id);
}

/**
* Returns the towns of given cities
* @param Collection $cities
Expand Down
3 changes: 2 additions & 1 deletion src/Services/PrayerTimesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ public function get($countrySlug, $citySlug = null, $townSlug = null)
/**
* @param $location
* @return array
* @throws \Exception
*/
private function getData($location)
public function getData($location)
{
$content = $this->prayerTimesRepository->get($location);

Expand Down

0 comments on commit a6d9f5f

Please sign in to comment.