mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
fix: prevent error when calling non-existent getTagClassName method
This commit is contained in:
@@ -100,7 +100,9 @@ class SpatieTagsInput extends TagsInput
|
||||
}
|
||||
|
||||
$model = $this->getModel();
|
||||
$tagClass = $model ? $model::getTagClassName() : config('tags.tag_model', Tag::class);
|
||||
$tagClass = $model && method_exists($model, 'getTagClassName')
|
||||
? $model::getTagClassName()
|
||||
: config('tags.tag_model', Tag::class);
|
||||
$type = $this->getType();
|
||||
$query = $tagClass::query();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user