@@ -61,7 +61,7 @@ public static function getModelMessage(): string
61
61
}
62
62
63
63
/**
64
- * @return BelongsToMany<TConversation, $this>
64
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
65
65
*/
66
66
public function conversations (): BelongsToMany
67
67
{
@@ -75,7 +75,7 @@ public function conversations(): BelongsToMany
75
75
/**
76
76
* Return unread conversations using the `message_reads` table
77
77
*
78
- * @return BelongsToMany<TConversation, $this>
78
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
79
79
*/
80
80
public function conversationsUnread (): BelongsToMany
81
81
{
@@ -85,7 +85,7 @@ public function conversationsUnread(): BelongsToMany
85
85
/**
86
86
* Return read conversations using the `message_reads` table
87
87
*
88
- * @return BelongsToMany<TConversation, $this>
88
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
89
89
*/
90
90
public function conversationsRead (): BelongsToMany
91
91
{
@@ -95,24 +95,24 @@ public function conversationsRead(): BelongsToMany
95
95
/**
96
96
* Return unread conversations using the pivot column `conversation_user.last_read_message_id`
97
97
*
98
- * @return BelongsToMany<TConversation, $this>
98
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
99
99
*/
100
100
public function denormalizedConversationsUnread (): BelongsToMany
101
101
{
102
102
return $ this
103
103
->conversations ()
104
104
->where (function ($ query ) {
105
105
return $ query
106
- ->wherePivot ( ' last_read_message_id ' , '= ' , null )
107
- ->orWherePivot ( ' last_read_message_id ' , '< ' , DB ::raw ('conversations.latest_message_id ' ));
106
+ ->where ( ' conversation_user. last_read_message_id ' , '= ' , null )
107
+ ->orWhere ( ' conversation_user. last_read_message_id ' , '< ' , DB ::raw ('conversations.latest_message_id ' ));
108
108
});
109
109
110
110
}
111
111
112
112
/**
113
113
* Return read conversations using the pivot column `conversation_user.last_read_message_id`
114
114
*
115
- * @return BelongsToMany<TConversation, $this>
115
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
116
116
*/
117
117
public function denormalizedConversationsRead (): BelongsToMany
118
118
{
@@ -122,31 +122,31 @@ public function denormalizedConversationsRead(): BelongsToMany
122
122
}
123
123
124
124
/**
125
- * @return BelongsToMany<TConversation, $this>
125
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
126
126
*/
127
127
public function conversationsNotMuted (): BelongsToMany
128
128
{
129
129
return $ this ->conversations ()->wherePivot ('muted_at ' , null );
130
130
}
131
131
132
132
/**
133
- * @return BelongsToMany<TConversation, $this>
133
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
134
134
*/
135
135
public function conversationsMuted (): BelongsToMany
136
136
{
137
137
return $ this ->conversations ()->wherePivot ('muted_at ' , '!= ' , null );
138
138
}
139
139
140
140
/**
141
- * @return BelongsToMany<TConversation, $this>
141
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
142
142
*/
143
143
public function conversationsNotArchived (): BelongsToMany
144
144
{
145
145
return $ this ->conversations ()->wherePivot ('archived_at ' , null );
146
146
}
147
147
148
148
/**
149
- * @return BelongsToMany<TConversation, $this>
149
+ * @return BelongsToMany<TConversation, $this, TConversationUser, 'conversationUser' >
150
150
*/
151
151
public function conversationsArchived (): BelongsToMany
152
152
{
0 commit comments