Skip to content

Notification Event #465

Open
Open
@connor-devuk

Description

@connor-devuk

What were you trying to do?

I'm trying to make a notfication have a custom click event: Notification::title('Team Call')
->message('Hey just a little reminder a team call is about to start!')
->event(\App\Events\OpenTeamCallEvent::class)
->show(); like so however when clicking it an internal server error happens

Only arrays and Traversables can be unpacked

This seems to be related to livewire however no variables should be passed so not too sure whats going on

This is my event

<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;

class OpenTeamCallEvent implements ShouldBroadcastNow
{
    public function broadcastOn(): array
    {
        return [
            new Channel('nativephp')
        ];
    }
}

What happened?

Clicking an event from a notification it throws the error Only arrays and Traversables can be unpacked

How to reproduce the bug

Notification::title('Team Call')
->message('Hey just a little reminder a team call is about to start!')
->event(\App\Events\OpenTeamCallEvent::class)
->show();

Package Versions

{
"installed": [
{
"name": "nativephp/electron",
"direct-dependency": true,
"homepage": "https://github.com/nativephp/electron",
"source": "https://github.com/NativePHP/electron/tree/0.9.0",
"version": "0.9.0",
"description": "Electron wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/laravel",
"direct-dependency": false,
"homepage": "https://github.com/nativephp/laravel",
"source": "https://github.com/NativePHP/laravel/tree/0.7.0",
"version": "0.7.0",
"description": "Laravel wrapper for the NativePHP framework.",
"abandoned": false
},
{
"name": "nativephp/php-bin",
"direct-dependency": false,
"homepage": "https://nativephp.com",
"source": "https://github.com/NativePHP/php-bin/tree/0.5.6",
"version": "0.5.6",
"description": "PHP binaries used by the NativePHP framework",
"abandoned": false
}
]
}

PHP Version

8.3

Laravel Version

11.37

Node Version

22.11.0

Which operating systems have you seen this occur on?

macOS

OS version

15.1 (24B83)

Notes

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions