src/ModelFilter.php
public function related($relation, $column, $operator = null, $value = null, $boolean = 'and')
    {
        if ($column instanceof \Closure) {
            return $this->addRelated($relation, $column);
        }

        // If there is no value it is a where = ? query and we set the appropriate params
        if ($value === null) {
            $value = $operator;
            $operator = '=';
        }

        return $this->addRelated($relation, function ($query) use ($column, $operator, $value, $boolean) {
            return $query->where($column, $operator, $value, $boolean);
        });
    }
public function related($relation, $column, $operator = null, $value = null, $boolean = 'and')
    {
        if ($column instanceof \Closure) {
            return $this->addRelated($relation, $column);
        }

        // If there is no value it is a where = ? query and we set the appropriate params
        if ($value === null) {
            $value = $operator;
            $operator = '=';
        }

        return $this->addRelated($relation, function ($query) use ($column, $operator, $value, $boolean) {
            return $query->where($column, $operator, $value, $boolean);
        });
    }
public function related ( $ relation , $ column , $ operator = null , $ value = null , $ boolean = 'and' ) { if ( $ column instanceof \ Closure ) { return $ this -> addRelated ( $ relation , $ column ) ; } // If there is no value it is a where = ? query and we set the appropriate params if ( $ value === null ) { $ value = $ operator ; $ operator = '=' ; } return $ this -> addRelated ( $ relation , function ( $ query ) use ( $ column , $ operator , $ value , $ boolean ) { return $ query -> where ( $ column , $ operator , $ value , $ boolean ) ; } ) ; }
Add a where constraint to a relationship.

@param $relation
@param $column
@param null $operator
@param null $value
@param string $boolean
@return $this
Add a where constraint to a relationship .