1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-26 17:56:48 +00:00
pixelfed/app/UserFilter.php

33 lines
652 B
PHP
Raw Normal View History

2018-07-18 00:05:37 +00:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class UserFilter extends Model
{
2018-08-23 04:23:19 +00:00
protected $fillable = [
2018-08-28 03:07:36 +00:00
'user_id',
'filterable_id',
'filterable_type',
'filter_type',
2018-08-23 04:23:19 +00:00
];
2018-08-31 03:43:43 +00:00
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');
}
2018-07-18 00:05:37 +00:00
}