Hi ! How are you ? I post my code.
.env filePUSHER_APP_ID=## BROADCAST_DRIVER=pusher PUSHER_APP_ID=### PUSHER_APP_KEY=## PUSHER_APP_SECRET=
Event file
`class MessageToProveedor implements ShouldBroadcast{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $username;
public $message;
public function __construct($username)
{
$this->username = $username;
$this->message = "liked your status";
}
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
//channel
return ['my-channel'];
}
public function broadcastAs()
{
//event
return 'my-event';
}
}`
JS File
`
`
**web.php (route) send message**
`Route::get('push', function () {
event(new App\Events\MessageToProveedor("ssa"));
return "Event has been sent!";
})->name('push');`
The error is on title. I don´t find any solution.
**My log console:**
`Pusher : State changed : connecting -> connected with new socket ID ##
pusher.min.js:8 Pusher : Event sent : {"event":"pusher:subscribe","data":{"channel":"my-channel"}}
pusher.min.js:8 Pusher : Event recd : {"event":"pusher_internal:subscription_succeeded","data":{},"channel":"my-channel"}
pusher.min.js:8 Pusher : No callbacks on my-channel for pusher:subscription_succeeded`
Hi ! How are you ? I post my code. .env file
PUSHER_APP_ID=## BROADCAST_DRIVER=pusher PUSHER_APP_ID=### PUSHER_APP_KEY=## PUSHER_APP_SECRET=
Event file `class MessageToProveedor implements ShouldBroadcast{ use Dispatchable, InteractsWithSockets, SerializesModels; public $username; public $message;
}`
JS File `
` **web.php (route) send message** `Route::get('push', function () { event(new App\Events\MessageToProveedor("ssa")); return "Event has been sent!"; })->name('push');` The error is on title. I don´t find any solution. **My log console:** `Pusher : State changed : connecting -> connected with new socket ID ## pusher.min.js:8 Pusher : Event sent : {"event":"pusher:subscribe","data":{"channel":"my-channel"}} pusher.min.js:8 Pusher : Event recd : {"event":"pusher_internal:subscription_succeeded","data":{},"channel":"my-channel"} pusher.min.js:8 Pusher : No callbacks on my-channel for pusher:subscription_succeeded`