Closed bert-w closed 4 years ago
Just change the getQualifiedForeignKey
to getQualifiedForeignKeyName
and upload via FTP.
obviously thats not gonna do much if you update composer...
I now simply copied the file and changed the line, and added it to composer.json like so:
"files": [
"app/FixJoiner.php"
]
Composer update will not affect any files unless the package has a newer version.
In case it does update, that bug would be fixed anyway, so you're all good. ;)
This also breaks compatibility with laravel 5.6, maybe bump the Illuminate/Database version restriction in composer.json?
This also breaks the compatibility with Laravel 5.7, the getQualifiedForeignKeyName
was introduced in Laravel 5.8.
I'm having the same issue with Laravel 5.5
https://github.com/jarektkaczyk/eloquence-base/blob/master/src/Relations/Joiner.php#L197
This function
getQualifiedForeignKey
doesnt exist anymore on BelongsTo, see:https://github.com/laravel/framework/blob/5.8/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
It is now named
getQualifiedForeignKeyName
. I tried to trace down the date+version at which it was changed, but for some reason I am unable to find it in the commits. If anyone want to take a look that would be appreciated:https://github.com/laravel/framework/commits/5.8/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
As for a quickfix: anyone know how to easily override this class function so that I can make it work on Laravel 5.7/5.8?