Skip to content

Commit

Permalink
Glorand patch 1 (#38)
Browse files Browse the repository at this point in the history
* replace hardcoded ->id by the generic ->getKey() to support table with primary not named id
Fix #36
  • Loading branch information
glorand authored Dec 11, 2019
1 parent a1eea2b commit 6c02732
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `glorand/laravel-model-settings` will be documented in this file

## 3.5.3 - 2019-12-11
### Fix
- https://github.com/glorand/laravel-model-settings/issues/36

## 3.5.2 - 2019-12-05
### Fix
- https://github.com/glorand/laravel-model-settings/issues/33
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<a href="https://scrutinizer-ci.com/g/glorand/laravel-model-settings/?branch=master">
<img src="https://scrutinizer-ci.com/g/glorand/laravel-model-settings/badges/coverage.png?b=master" alt="Scrutinizer Code Coverage"/>
</a>
<br />
<a title="MadeWithLaravel.com Shield" href="https://madewithlaravel.com/p/laravel-model-settings/shield-link"> <img src="https://madewithlaravel.com/storage/repo-shields/1716-shield.svg"/></a>
</p>

The package requires PHP 7.1.3+ and follows the FIG standards PSR-1, PSR-2 and PSR-4
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HasSettingsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function modelSettings(): MorphOne

public function getSettingsCacheKey(): string
{
return config('model_settings.settings_table_cache_prefix') . $this->getTable() . '::' . $this->id;
return config('model_settings.settings_table_cache_prefix') . $this->getTable() . '::' . $this->getKey();
}

abstract public function getTable();
Expand Down

0 comments on commit 6c02732

Please sign in to comment.