[X] a copy of your Models that use or extend this package (just the relevant parts!)
Using the trait right out of the can:
class Course extends Model implements HasCommentsInterface, HasNotes
{
use HasFactory,
HasComments,
HasNotesTrait,
SoftDeletes,
Taggable;
// etc
}
[X] any other code we might need to help
The main issue comes from depending on php get_class() in TagService::getAllTags() and TagService::getPopularTags(). Also the anonymous class in TagService::getQualifiedPivotTableName() needs to either implement the getMorphClass() method from Illuminate\Database\Eloquent\Concerns\HasRelationships or otherwise get around the morph map enforcement.
Please be sure you include all the relevant information in your issue so we can help you:
Installed per instructions. Using only one model so far, App\Models\Course, which implements Taggable with no overrides.
Using the trait right out of the can:
The main issue comes from depending on php
get_class()
inTagService::getAllTags()
andTagService::getPopularTags()
. Also the anonymous class inTagService::getQualifiedPivotTableName()
needs to either implement thegetMorphClass()
method fromIlluminate\Database\Eloquent\Concerns\HasRelationships
or otherwise get around the morph map enforcement.I'll open a PR for the above.