cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
537 stars 72 forks source link

Issue With Uuid Model ID #139

Open reasecret opened 1 year ago

reasecret commented 1 year ago

I'm using uuid for my model's id column and taggable_id column type is BIGINT. There is a conflict with column types.

Maybe this option can be change on "taggable.php" config file like this:

'uuid' => true,

And this config could be check on migration file:

if (config('taggable.uuid')) {
     $table->uuidMorphs('taggable');
} else {
     $table->morphs('taggable');
}

This is just a suggestion.

cviebrock commented 1 year ago

Good idea @reasecret ! If you want to put together a PR for this feature, I'd be happy to add it quickly.