Eloquent::has PHP Method

has() public static method

Add a relationship count / exists condition to the query.
public static has ( string $relation, string $operator = '>=', integer $count = 1, string $boolean = 'and', Closure | null $callback = null ) : Builder | static
$relation string
$operator string
$count integer
$boolean string
$callback Closure | null
return Illuminate\Database\Eloquent\Builder | static
        public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
        {
            return \Illuminate\Database\Eloquent\Builder::has($relation, $operator, $count, $boolean, $callback);
        }
Eloquent