Ошибка при отправке event через Pusher : local.ERROR: Pusher error: cURL error 7: Failed to connect to localhost port 8080 after 0 ms:
Отправляю event тестовый на фронт
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class MyEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
public function broadcastOn()
{
return new Channel('my-channel');
}
public function broadcastAs()
{
return 'my-event';
}
}
вот сам event
<?php
namespace App\Http\Controllers;
use App\Events\MyEvent;
use App\Events\TestEvent;
use Illuminate\Http\Request;
class TestEventController extends Controller
{
public function sendTestEvent(Request $request)
{
event(new TestEvent('Привет, это тестовое сообщение!'));
return response()->json(['status' => 'Событие отправлено']);
}
}
контролер
Запускаю потом очереди и в логах дает ошибку
[2024-08-09 15:23:37] local.ERROR: Pusher error: cURL error 7: Failed to connect to localhost port 8080 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:8080/apps/838075/events?auth_key=cnppbxcgb0mhtfhieve4&auth_timestamp=1723217017&auth_version=1.0&body_md5=d32cd63fe1ba7f01b6756da9017f0f0d&auth_signature=1b2c3647055a9eed651c64b351c728d20a6e3d9b64ca07377dc93a900f85d6d4. {"exception":"[object] (Illuminate\\Broadcasting\\BroadcastException(code: 0): Pusher error: cURL error 7: Failed to connect to localhost port 8080 after 0 ms: Could not connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:8080/apps/838075/events?auth_key=cnppbxcgb0mhtfhieve4&auth_timestamp=1723217017&auth_version=1.0&body_md5=d32cd63fe1ba7f01b6756da9017f0f0d&auth_signature=1b2c3647055a9eed651c64b351c728d20a6e3d9b64ca07377dc93a900f85d6d4. at /Users/ruslantasmetov/pulsbackend/pulsebackend/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:164)
[stacktrace]
Может кто сталкивался , использую laravel 11