Skip to content

Argument #1 ($result) must be of type array, Aws\Result given #19

Open
@Caceres-Joseph

Description

@Caceres-Joseph

Hi @georgeboot

I have created a route for call the broadcast like this

# web.php

Route::get('/broadcast', function () {
    broadcast(new Hello());
});

This is my event

/app/Events/Hello.php

<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class Hello implements ShouldBroadcast
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    /**
     * Create a new event instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    public function broadcastWith()
    {
        return [
            'hello' => 'hi there'
        ];
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new Channel('channel');
    }
}

I already checked that the lambda has permissions for the DynamoDB table but I noticed that the Dynamo table is empty, that could be why I get this error when calling the event

image

Do you know what could be?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions