mardi 5 mars 2019

Use tables prefix for spatie/laravel-tags tables

In my laravel 5.7 app I use "spatie/laravel-tags": "^2.1". I need to use prefix for table names and I set table property of any model with prefix and with empty prefix property in config/database.php. It works for my model, except tag model, when I use mettod findOrCreate from Spatie\Tags\Tag.

I got error that table “tags” not found, as my prefix is not set. If there is a way to set this prefix(config options?) ? sure decision without modifications of vendor/spatie/laravel-tags/src/Tag.php file preferable...

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire