mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 04:53:17 +00:00
Update Place model, add url methods
This commit is contained in:
parent
a3ae352fd2
commit
7e11e4aa44
1 changed files with 12 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue