PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

Notifications "marked as read" are deleted?

richard-madison

Oct 24th, 2018 01:39 PM

Hello,

When we mark a notification as read in Wave, it appears to get deleted from the database.

Is there an option to have it marked as read in the database (and not deleted) and then perhaps on the Notifications page, show the read notifications below the unread notifications?

If not, I'd love to +1 this great suggestion ;)

Thanks,

Richard

bobbyiliev

Sep 25th, 2022 09:24 AM

Hi there,

I am just following up on some of the old unanswered questions on the site.

Yes, this is doable but with a little bit of a modification to the existing project.

In the Notifications table there is a column called read_at:

By default it is going to be set to null, what you could do is to update the method in the Nitifications controller, so that the notifications are not deleted, but the read_at is updated to the current time:

That way then in the notifications index blade view, you can introduce a little check to see if the read_at column is set and highlight that to the user.

Hope that this helps anyone who comes across this in the future!

Best,

Bobby