bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Custom filters on BelongsToMany throws BadMethodCallException

Open dracon opened this issue 5 years ago • 0 comments

"message": "Call to undefined method Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany::getQualifiedRelatedKeyName()", "exception": "BadMethodCallException", "file": "/var/www/bneapilocal/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php", "line": 50,

In EloquentBuilderTrait.php In method joinRelatedModelIfExists At line 299

Custom filters on BelongsToMany throws exception on the method call at line 299: $relation->getQualifiedRelatedKeyName() When I change it to: $relation->getQualifiedRelatedPivotKeyName()

This works fine.

dracon avatar Apr 08 '19 08:04 dracon