1
0
Fork 0
forked from mirror/pixelfed

Update Place model

This commit is contained in:
Daniel Supernault 2019-08-13 01:47:15 -06:00
parent f3415e80ed
commit a8b63934e4
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -7,14 +7,7 @@ use Pixelfed\Snowflake\HasSnowflakePrimary;
class Place extends Model class Place extends Model
{ {
use HasSnowflakePrimary; protected $visible = ['id', 'name', 'country', 'slug'];
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
public function url() public function url()
{ {
@ -30,4 +23,9 @@ class Place extends Model
{ {
return $this->posts()->count(); return $this->posts()->count();
} }
public function statuses()
{
return $this->hasMany(Status::class, 'id', 'place_id');
}
} }