Level 34
@medala have you tried clearing your config?
php artisan config:clear or php artisan config:cache
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have my BROADCAST_DRIVER=pusher in env file, I can't find out why this event is trying to use redis. I get the same error even if I set BROADCAST_DRIVER=log!!!. This is the env for broadcasting:
BROADCAST_DRIVER=pusher
CACHE_DRIVER=file
QUEUE_CONNECTION=redis
SESSION_DRIVER=file
SESSION_LIFETIME=120
Event: NotifyNewOrder
<?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 NotifyNewOrder implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $foo = 'bar';
/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
return new Channel('echoorder');
//return new PrivateChannel('channel-name');
}
}
the Route:
Route::get('/rdrdrd', 'OrderController@testnoti');
The Controller: OrderController
{
//NotifyNewOrder::dispatch();
NotifyNewOrder::dispatch();
}
Error:
Predis\Connection\ConnectionException
No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379]
http://localhost:8000/rdrdrd
C:\xampp\htdocs\kansupply\vendor\predis\predis\src\Connection\AbstractConnection.php:155
protected function onConnectionError($message, $code = null)
{
CommunicationException::handle(
new ConnectionException($this, static::createExceptionMessage($message), $code)
);
}
QUEUE_CONNECTION should be sync, fixed it
Please or to participate in this conversation.