Artisan Channel:list return doesn't have any private broadcasting channels
Hi everyone,
I'm having problems with private channels.
In my channels.php file, there is already a channel created by Laravel when running the install broadcasting command.
However when I run the command
php artisan channel:list
it always returns the error:
ERROR Your application doesn't have any private broadcasting channels.
I have researched and learned that with Laravel 10 and earlier, we need to register a ServiceProvider to use, but from version 11 that I am using, there is no need.
Can someone help me solve this problem?
Thank you very much!
@s4muel Thank for your reply
But as i know, from Laravel 11 later, i don't need register ServiceProvider in app.php, and i also can't find where to register BroadcastServiceProvider in app.php
@guanzu99 you are right, but if you updated from L10, you still probably have an old structure (i just assumed this, so my previous answer might be of course misleading/wrong if you installed L11 from scratch).
to sum it up: if you updated from L10, you probably have the old app.php structure, so try uncommenting (or adding) App\Providers\BroadcastServiceProvider::class in the app.php (https://github.com/laravel/laravel/blob/10.x/config/app.php#L168)
if not, clear the config cache. and if those tips does not solve the issue, i cant help further.
@does1tmatter Happened to me aswell, in the docs it says that the install command automatically registers all necessary routes, providers and other stuff. But it doesn't register the channels.php for some reason.