mpociot / laravel-test-factory-helper

Generate Laravel test factories from your existing models
935 stars 87 forks source link

Fix for getForeignKey() exception on Laravel > 5.8 #36

Closed SvenSlijkoord closed 5 years ago

SvenSlijkoord commented 5 years ago

Fix for exception: Exception: Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::getForeignKey() on Laravel >= 5.8 while still maintaining backwards compatibility with Laravel < 5.8

jasonmccreary commented 5 years ago

Good spot. We need tests! 😱