Notifications are saved in the database with null user_id #37439
Unanswered
alexugthub
asked this question in
Q&A
Replies: 1 comment
-
Hi ✋🏻 The value of the Since the notifications module is using Polymorphic Relationships, each model of your application that has the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there
When I try to save a notification for a user, the user_id column is always NULL in the database.
I have the
Notifiable
trait assigned to theUser
model and this also happens when I use theNotification
facade. It just doesn't save anything in the user_id column.I get the user through a relationship, something like
$this->buyer->user
whereBuyer
model belongs toUser
. I can see that the user is retrieved properly and has the ID.I try to send the notification like this:
When I log the database queries I get this for this operation:
I don't see the
user_id
column in this query. Is this a bug or what could I be doing wrong? I have had this issue for weeks and can't find the culprit. I am using version 8.12Beta Was this translation helpful? Give feedback.
All reactions