public function addRelation($columnName)
    {
        $relationName = getRelationName($columnName);

        if (
            ! array_key_exists($relationName, $this->relations) &&
            ! in_array($relationName, $this->relations)
        ) {
            $methodName = camel_case('laratables_'.$relationName.'relation_query');
            if (method_exists($this->class, $methodName)) {
                $this->relations[$relationName] = $this->class::$methodName();

                return;
            }

            $this->relations[] = $relationName;
        }
    }
public function addRelation($columnName)
    {
        $relationName = getRelationName($columnName);

        if (
            ! array_key_exists($relationName, $this->relations) &&
            ! in_array($relationName, $this->relations)
        ) {
            $methodName = camel_case('laratables_'.$relationName.'relation_query');
            if (method_exists($this->class, $methodName)) {
                $this->relations[$relationName] = $this->class::$methodName();

                return;
            }

            $this->relations[] = $relationName;
        }
    }
public function addRelation ( $ columnName ) { $ relationName = getRelationName ( $ columnName ) ; if ( ! array_key_exists ( $ relationName , $ this -> relations ) && ! in_array ( $ relationName , $ this -> relations ) ) { $ methodName = camel_case ( 'laratables_' . $ relationName . 'relation_query' ) ; if ( method_exists ( $ this -> class , $ methodName ) ) { $ this -> relations [ $ relationName ] = $ this -> class :: $ methodName ( ) ; return ; } $ this -> relations [ ] = $ relationName ; } }
Adds the relation to be loaded with the query.

@param string Name of the column

@return void
Adds the relation to be loaded with the query .