jarektkaczyk / eloquence-base

base for the Eloquence extensions + Searchable
https://softonsofa.com
MIT License
78 stars 71 forks source link

Fix the foreign key name for laravel version < 5.8 #19

Closed daniel-werner closed 4 years ago

daniel-werner commented 5 years ago

Before Laravel 5.8 the BelongsTo relationship didn't have getQualifiedForeignKeyName method, it was called getQualifiedForeignKey.

To reproduce the error without installing the package in a Laravel application, downgrade the laravel package versions to <5.8:

composer require illuminate/database:5.7.* illuminate/container:5.7.* illuminate/contracts:5.7.* illuminate/support:5.7.*

This will make the JoinerTests fail, because of the missing method call.

This PR fixes #12

krisnaw commented 4 years ago

Any update about this PR?

krisnaw commented 4 years ago

@daniel-werner any plan to update the error build?

daniel-werner commented 4 years ago

@krisnaw Well, the Scrutinizer errors were introduced in the master, not in this PR. These could be fixed, but it seems like the maintainer didn't update this project recently. I am not sure if those would be merged.