feat: add tagging functionality

to entries model and related migrations
This commit is contained in:
jon brookes 2026-01-08 13:41:18 +00:00
parent 4afa656e94
commit 4e1824d49a
7 changed files with 361 additions and 14 deletions

28
config/tags.php Normal file
View file

@ -0,0 +1,28 @@
<?php
return [
/*
* The given function generates a URL friendly "slug" from the tag name property before saving it.
* Defaults to Str::slug (https://laravel.com/docs/master/helpers#method-str-slug)
*/
'slugger' => null,
/*
* The fully qualified class name of the tag model.
*/
'tag_model' => Spatie\Tags\Tag::class,
/*
* The name of the table associated with the taggable morph relation.
*/
'taggable' => [
'table_name' => 'taggables',
'morph_name' => 'taggable',
/*
* The fully qualified class name of the pivot model.
*/
'class_name' => Illuminate\Database\Eloquent\Relations\MorphPivot::class,
]
];