search

Home  >  Q&A  >  body text

Laravel recently used Notifications, its own on-site database notification function, but it would be a pain if the same information was sent in groups.

For example, if I make a simple announcement, I will insert it 10,000 times for 10,000 users, which is really painful. It stands to reason that there should be an in-site message function to separate the information content and user reading records. When the user logs in, the reading records are inserted and stored separately to save space.
But I just want to use the built-in notification function to implement traditional in-site messages, and I don’t want to create a separate in-site message.

習慣沉默習慣沉默2804 days ago941

reply all(2)I'll reply

  • 为情所困

    为情所困2017-05-16 16:50:00

    To be honest, this is a scenario generally used for email and SMS.
    Of course, you can be patient and create a user with an ID of 0, and then read this as a system message.

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 16:50:00

    Owner, I think you may have misunderstood. It is not that private channels can only be named after user_id. . .

    The client and server are determined by your own code. You can use user groups, or separate logged-in users and visitors as channel units. You can achieve group posting by label.

    reply
    0
  • Cancelreply