* * @version 1.0.0 */ class UpdateRoleUser implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; /** * Crear instancia del evento */ public function __construct( public Role $role ) {} /** * Obtener los canales a los que se debe transmitir el evento * * @return array */ public function broadcastOn(): array { return [ new PrivateChannel("App.Models.Role.{$this->role->id}"), ]; } }