From 7e11e4aa449be6054e22b2563837ea338f2c1eda Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 29 Aug 2019 18:30:26 -0600 Subject: [PATCH] Update Place model, add url methods --- app/Place.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/Place.php b/app/Place.php index a63c507c5..5ea6351cc 100644 --- a/app/Place.php +++ b/app/Place.php @@ -28,4 +28,16 @@ class Place extends Model { return $this->hasMany(Status::class, 'id', 'place_id'); } + + public function countryUrl() + { + $country = strtolower($this->country); + $country = urlencode($country); + return url('/discover/location/country/' . $country); + } + + public function cityUrl() + { + return $this->url(); + } }