src/Listify.php
protected function getConditionStringFromBelongsTo(BelongsTo $relation)
    {
        $id = $this->getAttribute( $relation->getForeignKeyName() );

        // an empty foreign key will, as a null-scope, remove the item from any list
        if (null === $id) return null;

        return '`' . $relation->getForeignKeyName() . '` = ' . (int) $id;
    }
protected function getConditionStringFromBelongsTo(BelongsTo $relation)
    {
        $id = $this->getAttribute( $relation->getForeignKeyName() );

        // an empty foreign key will, as a null-scope, remove the item from any list
        if (null === $id) return null;

        return '`' . $relation->getForeignKeyName() . '` = ' . (int) $id;
    }
protected function getConditionStringFromBelongsTo ( BelongsTo $ relation ) { $ id = $ this -> getAttribute ( $ relation -> getForeignKeyName ( ) ) ; // an empty foreign key will, as a null-scope, remove the item from any list if ( null === $ id ) return null ; return '`' . $ relation -> getForeignKeyName ( ) . '` = ' . ( int ) $ id ; }
Makes a raw where condition string from a BelongsTo relation instance.

@param BelongsTo $relation
@return string
Makes a raw where condition string from a BelongsTo relation instance .