rename admins-private to users.registration
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Events;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
||||
@@ -33,12 +32,12 @@ class UserCreated implements ShouldBroadcastNow
|
||||
public function broadcastOn(): array
|
||||
{
|
||||
return [
|
||||
new privateChannel('admins-private'),
|
||||
new privateChannel('users.registration'),
|
||||
];
|
||||
}
|
||||
|
||||
public function broadcastAs()
|
||||
{
|
||||
return 'user.created';
|
||||
return 'users.registration';
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
|
||||
Broadcast::channel('admins-private', function ($user) {
|
||||
Broadcast::channel('users.registration', function ($user) {
|
||||
return in_array($user->role, [1, 2]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user