laravel Call to undefined method 1Illuminate\Database\Query\Builder::getForeignKeyName() or 1Illumin

vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php 
添加!!!!!!!

public function getForeignKeyName()
{
    $segments = explode('.', $this->getQualifiedForeignKeyName());
    return end($segments);
}

public function getQualifiedForeignKeyName()
{
    return $this->foreignKey;
}

你可能感兴趣的:(php,laravel)