Update Place model, add url methods

pull/1655/head
Daniel Supernault 2019-08-29 18:30:26 -06:00
rodzic a3ae352fd2
commit 7e11e4aa44
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -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();
}
}