public function morphedByMany($related, $name, $table = null, $foreignKey = null, $otherKey = null)
{
$foreignKey = $foreignKey ?: $this->getForeignKey();
// For the inverse of the polymorphic many-to-many relations, we will change
// the way we determine the foreign and other keys, as it is the opposite
// of the morph-to-many method since we're figuring out these inverses.
$otherKey = $otherKey ?: $name . '_id';
return $this->morphToMany($related, $name, $table, $foreignKey, $otherKey, true);
}