Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to configure a custom Taggables model class #470

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

eggnaube
Copy link
Contributor

This change allows the use of an own taggables class. Thus, for example, events can be easily registered on the taggables.

@freekmurze freekmurze merged commit 416cc5b into spatie:main Jul 20, 2023
@freekmurze
Copy link
Member

Thanks!

@gregpriday
Copy link

I can submit a separate PR for this, but shouldn't we ensure some sort of backward compat with old config files to prevent issues like this #472?

Something like this:

public function getPivotModelClassName(): string
{
    return config('tags.taggable.class_name', Illuminate\Database\Eloquent\Relations\MorphPivot::class);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants