3 years ago

Grouping Laravel 5.3 Notifications

Posted 3 years ago by joseph127

I was just wondering if it would be possible to group the responses by the data which is recorded in the notification. For example, my notification data is:

    "id": "90cc403e-1cca-4dc9-8dd1-9d250eb674a9",
    "type": "App\\Notifications\\CommentedOnScreen",
    "notifiable_id": 1,
    "notifiable_type": "App\\User",
    "data": {
        "from_user": 2,
        "dot_id": 4,
        "screen_id": 1,
        "comment": "hello"
    "read_at": null,
    "created_at": "2016-08-23 00:11:32",
    "updated_at": "2016-08-23 00:11:32"

I'd like to group the notifications by the "screen_id" is that possible? If so how'd someone go about doing that?

Please sign in or create an account to participate in this conversation.