Replies: 1 comment 2 replies
-
Are you sure the context is being serialized correctly in the settings table? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am working on an application that makes use of Laravel Jetstream with teams and users and was looking for a way to scope a setting per user.
I have followed the setup instructions available in the documentation and although I am able to set and get settings, I can see the record on the table, it seems to keep track of the setting globally rather than on a per user basis.
I have added the
HasSettings
to theUser
model and I use the current user to get or set values with$request->user()->settings()->set('dark_mode', true)
.Laravel is version 10.
The way I am using the package is similar to the following.
Any help would be much appreciated.
Here's some code that might be relevant:
Expand Tinker output
Expand User model
Expand settings.php
Beta Was this translation helpful? Give feedback.
All reactions