hasMany(JointPermission::class, 'entity_id', 'sluggable_id') ->whereColumn('joint_permissions.entity_type', '=', 'slug_history.sluggable_type'); } }