$this->unreadNotifications->markAsRead ();
class User extends Authenticatable implements MustVerifyEmailContract
{
.
.
.
public function markAsRead()
{
$this->notification_count = 0;
$this->save();
$this->unreadNotifications->markAsRead();
}
}
$this->unreadNotifications->markAsRead();
这个什么意思 user里没这个字段啊..
推荐文章: