-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
- LaravelSettings Version: 8.12
- Laravel Version: 8.1
- PHP Version: 7.4
Description:
I'm use the same settings key for a global setting (user_id=0) and for a setting that's tied to a user. When attempting to fetch the global setting value, I get the user defined setting, instead. I would anticipate, if I'm not adding the setExtraColumns() to the method, it would default to the global (user_id=0) value.
Steps To Reproduce:
| user_id | key | value |
-------------------------
| 0 | foo | bar |
| 1 | foo | baz |
settings()->get('foo') // baz
settings()->setExtraColumns(['user_id' => auth()->id()])->get('foo'); // baz
settings()->setExtraColumns(['user_id' => 0])->get('foo'); // bar
Am I just understanding it wrong, or can the settings method default to uuser_id of 0 first?
Metadata
Metadata
Assignees
Labels
No labels