From a1eea2b797b4c8dec756f8488d8aa64d7d5a86df Mon Sep 17 00:00:00 2001 From: Lorand Gombos Date: Wed, 4 Dec 2019 23:58:35 +0200 Subject: [PATCH] Update HasSettingsTable.php (#34) Fix #33 --- CHANGELOG.md | 4 ++++ src/Traits/HasSettingsTable.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 793963d..f7cea36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `glorand/laravel-model-settings` will be documented in this file +## 3.5.2 - 2019-12-05 +### Fix +- https://github.com/glorand/laravel-model-settings/issues/33 + ## 3.5.1 - 2019-11-29 ### Fix - Check column settings exists directly on the database table diff --git a/src/Traits/HasSettingsTable.php b/src/Traits/HasSettingsTable.php index b16cb62..b3750a9 100644 --- a/src/Traits/HasSettingsTable.php +++ b/src/Traits/HasSettingsTable.php @@ -61,6 +61,8 @@ public function modelSettings(): MorphOne public function getSettingsCacheKey(): string { - return config('model_settings.settings_table_cache_prefix') . $this->id; + return config('model_settings.settings_table_cache_prefix') . $this->getTable() . '::' . $this->id; } + + abstract public function getTable(); }