Update UserFilter model

pull/422/head
Daniel Supernault 2018-08-30 21:43:43 -06:00
rodzic de1ebae425
commit 4db7b72747
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -12,4 +12,21 @@ class UserFilter extends Model
'filterable_type',
'filter_type',
];
public function mutedUserIds($profile_id)
{
return $this->whereUserId($profile_id)
->whereFilterableType('App\Profile')
->whereFilterType('mute')
->pluck('filterable_id');
}
public function blockedUserIds($profile_id)
{
return $this->whereUserId($profile_id)
->whereFilterableType('App\Profile')
->whereFilterType('block')
->pluck('filterable_id');
}
}