|UserFilter newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|UserFilter newQuery() * @method static \Illuminate\Database\Eloquent\Builder|UserFilter query() * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereFilterType($value) * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereFilterableId($value) * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereFilterableType($value) * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UserFilter whereUserId($value) * * @mixin \Eloquent */ class UserFilter extends Model { protected $guarded = []; public function mutedUserIds($profile_id) { return $this->whereUserId($profile_id) ->whereFilterableType(Profile::class) ->whereFilterType('mute') ->pluck('filterable_id'); } public function blockedUserIds($profile_id) { return $this->whereUserId($profile_id) ->whereFilterableType(Profile::class) ->whereFilterType('block') ->pluck('filterable_id'); } public function instance() { return $this->belongsTo(Instance::class, 'filterable_id'); } public function user() { return $this->belongsTo(Profile::class, 'user_id'); } }