Is there a way to make a Laravel 7 polymorphic relationship work with Laravel 8?

Viewed 96

I have a Laravel 7 app with a polymorphic relationship saved in the database. I also have another Laravel 8 app querying the same database. The problem is Laravel 7 saves the morph type as "App\Model" while Laravel 8 saves as 'App\Models\Model'. So when I'm querying the relationship from my Laravel 8 app, it returns null. Anyone know how to fix this, bar moving my models from the Models folder?

1 Answers
Related