Closed dgerike closed 6 years ago
This fixes the issue with the belongsTo method, as described in https://github.com/Vinelab/NeoEloquent/issues/281.
belongsTo
Code is copy-pasted from the \Illuminate\Database\Eloquent\Relations\HasOneOrMany class. No good style, I know, but it was the least invasive way to solve the immediate problem.
\Illuminate\Database\Eloquent\Relations\HasOneOrMany
I tested it locally (works for all of my use cases) and Travis is still happy, too (https://travis-ci.org/dgerike/NeoEloquent/).
Was having the same issue as #281 and this change fixed it 👍
Should it maybe reference the method implementation from the actual Illuminate\Database\Eloquent\Relations\BelongsTo though? Just a thought.
Illuminate\Database\Eloquent\Relations\BelongsTo
This fixes the issue with the
belongsTo
method, as described in https://github.com/Vinelab/NeoEloquent/issues/281.Code is copy-pasted from the
\Illuminate\Database\Eloquent\Relations\HasOneOrMany
class. No good style, I know, but it was the least invasive way to solve the immediate problem.I tested it locally (works for all of my use cases) and Travis is still happy, too (https://travis-ci.org/dgerike/NeoEloquent/).