Update Place model

pull/1603/head
Daniel Supernault 2019-08-13 01:47:15 -06:00
rodzic f3415e80ed
commit a8b63934e4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 6 dodań i 8 usunięć

Wyświetl plik

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