<?php

namespace App\Classes\General\Eloquent\Filters;

use App\Models\User;
use Illuminate\Database\Eloquent\Builder;

class TargetId implements Filter
{

    /**
     * @param Builder $builder
     * @param $value
     * @return Builder|mixed
     */
    public static function apply(Builder $builder, $value)
    {
        return $builder->where('target_type', User::class)->where('target_id', $value);
    }

}