protected static function applyRelationFilter($query, $column, $searchValue)
    {
        if ($methodName = self::hasCustomSearch(str_replace('.', '_', $column))) {
            return self::$class::$methodName($query, $searchValue);
        }

        list($relationName, $relationColumnName) = getRelationDetails($column);
        $searchValue = '%'.$searchValue.'%';

        return $query->orWhereHas($relationName, function ($query) use ($relationColumnName, $searchValue) {
            $query->where($relationColumnName, 'like', "$searchValue");
        });
    }
protected static function applyRelationFilter($query, $column, $searchValue)
    {
        if ($methodName = self::hasCustomSearch(str_replace('.', '_', $column))) {
            return self::$class::$methodName($query, $searchValue);
        }

        list($relationName, $relationColumnName) = getRelationDetails($column);
        $searchValue = '%'.$searchValue.'%';

        return $query->orWhereHas($relationName, function ($query) use ($relationColumnName, $searchValue) {
            $query->where($relationColumnName, 'like', "$searchValue");
        });
    }
protected static function applyRelationFilter ( $ query , $ column , $ searchValue ) { if ( $ methodName = self :: hasCustomSearch ( str_replace ( '.' , '_' , $ column ) ) ) { return self :: $ class :: $ methodName ( $ query , $ searchValue ) ; } list ( $ relationName , $ relationColumnName ) = getRelationDetails ( $ column ) ; $ searchValue = '%' . $ searchValue . '%' ; return $ query -> orWhereHas ( $ relationName , function ( $ query ) use ( $ relationColumnName , $ searchValue ) { $ query -> where ( $ relationColumnName , 'like' , "$searchValue" ) ; } ) ; }
Applies filter condition for the relation column.

@param \Freshbitsweb\Laratables\QueryHandler Query object
@param string Column name
@param string Search string

@return \Freshbitsweb\Laratables\QueryHandler Query object
Applies filter condition for the relation column .