Laravel 11.5 has just been released, and it added anonymous broadcasting. What is it? Let's take a look.

This message is triggered by a private anonymous event, so let's see how it's done.
Global Anonymous Events
We want to start by re-creating our first example from the previous lesson—a global event that will inform all users about system maintenance. We will use the same event and channel, but this time, we will make it anonymous.

To create a channel for this, we will modify the routes/channels.php file:
// ... Broadcast::channel('system-maintenance', function () { // Public Channel});
Then, we want to create a new command to trigger this event:
php artisan make:command SystemNotifyMaintenanceCommand
And modify the command file:
app/Console/Commands/SystemNotifyMaintenanceCommand.php
use Illuminate\Console\Command;use Illuminate\Support\Facades\Broadcast; class SystemNotifyMaintenanceCommand extends Command{ protected $signature = 'system:notify-maintenance'; protected $description = 'Command description'; public function handle(): void { $time = $this->ask('When should it happen?'); Broadcast::on('system-maintenance') ->as('App\\Events\\SystemMaintenanceEvent') ->with([ 'time' => $time ]) ->via('reverb') ->send(); }}
Next, we will add a...
It seems unnecessary to add this for a public channel
In a way - yes, but on quick look - it makes it clear that everyone can access it. So it's just for readability
Perhaps it would be more appropriate to list public channels in the form of comments, because even if you return false, the message will still be delivered, which is somewhat misleading, implying that we can control access to the public channel.
At this stage - I might agree with you. Indeed, a better choice would be a comment, thanks :)