protected function buildRelationQuery()
    {
        $args = func_get_args();

        list($relation, $args[0]) = explode('.', $this->column);

        return ['whereHas' => [$relation, function ($relation) use ($args) {
            call_user_func_array([$relation, $this->query], $args);
        }]];
    }
protected function buildRelationQuery()
    {
        $args = func_get_args();

        list($relation, $args[0]) = explode('.', $this->column);

        return ['whereHas' => [$relation, function ($relation) use ($args) {
            call_user_func_array([$relation, $this->query], $args);
        }]];
    }
protected function buildRelationQuery ( ) { $ args = func_get_args ( ) ; list ( $ relation , $ args [ 0 ] ) = explode ( '.' , $ this -> column ) ; return [ 'whereHas' => [ $ relation , function ( $ relation ) use ( $ args ) { call_user_func_array ( [ $ relation , $ this -> query ] , $ args ) ; } ] ] ; }
Build query condition of model relation.

@return array
Build query condition of model relation .