src/Prettus/Repository/Eloquent/BaseRepository.php
public function whereHas($relation, $closure)
    {
        $this->model = $this->model->whereHas($relation, $closure);

        return $this;
    }
public function whereHas($relation, $closure)
    {
        $this->model = $this->model->whereHas($relation, $closure);

        return $this;
    }
public function whereHas ( $ relation , $ closure ) { $ this -> model = $ this -> model -> whereHas ( $ relation , $ closure ) ; return $ this ; }
Load relation with closure

@param string $relation
@param closure $closure

@return $this
Load relation with closure