Illuminate\Database\Eloquent\Relations\BelongsTo::getQualifiedOtherKeyName PHP 메소드

getQualifiedOtherKeyName() 공개 메소드

Get the fully qualified associated key of the relationship.
public getQualifiedOtherKeyName ( ) : string
리턴 string
    public function getQualifiedOtherKeyName()
    {
        return $this->related->getTable() . '.' . $this->otherKey;
    }

Usage Example

예제 #1
2
 protected function joinBelongsToRelation(Relations\BelongsTo $relation, $type)
 {
     $table = $relation->getRelated()->getTable();
     $foreignKey = $relation->getQualifiedForeignKey();
     $localKey = $relation->getQualifiedOtherKeyName();
     $this->query->join($table, $foreignKey, '=', $localKey, $type);
 }
All Usage Examples Of Illuminate\Database\Eloquent\Relations\BelongsTo::getQualifiedOtherKeyName