Closed ghost closed 3 weeks ago
latest
11.x
I am trying to get all settings for a user.
$user = Auth::user(); dd($user->settings()->all());
Returns an empty collection.
Illuminate\Support\Collection {#2596 ▼ #items: [] #escapeWhenCastingToString: false }
but this works:
dd($user->settings()->context('user')->all());
So it looks like the context is not applied automatically when calling settings()->all() on the User model.
No response
I believe this is related to #49. Using the DotNotationContextSerializer should resolve this issue for you.
DotNotationContextSerializer
I'm going to close this issue, but feel free to re-open if that serializer doesn't help with this.
Laravel Settings
latest
Laravel Version
11.x
Bug description
I am trying to get all settings for a user.
Returns an empty collection.
but this works:
So it looks like the context is not applied automatically when calling settings()->all() on the User model.
Steps to reproduce
No response
Relevant log output
No response