Open alexbowers opened 3 years ago
An example of the DB structure I have:
tags_models
id
tag_id
model_id
model
Where model
is what Laravel expects to be model_type
This sounds more like a feature request so I've moved the issue to the ideas repo.
Description:
Currently there is a hardcoded string for the morphType in a polymorphic many to many relationship that is impossible to override meaning that you cannot define a polymorphic relationship against an existing database structure unless you have the same db structure.
It can be seen here: https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php#L53
Is it possible for this to be made so it can be overridden by the developer in some manner.