Answer the question
In order to leave comments, you need to log in
How to bind the user settings model to the User model?
When developing notifications (using the standard Notifications class), it became possible to get all notifications in this way: Auth::user()->notifications
I have a table user_settings
that stores settings for each user. How can they implement the ability to access user settings, not through the UserSettings model, but in the same way as for notifications Auth::user()->settings
?
Answer the question
In order to leave comments, you need to log in
It is logical that in the User model you need to create a settings connection with the UserSetting model, thus you can get them as Auth::user()->settings
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question