can't remove laravel_database_ prefix from channel

can definition
can synonym
can noun meaning
can verb
can bus
can band
cant
can.'' acronym

I'm setting up Laravel echo to broadcast events. But whenever I try to broadcast to a channel the channel name gets an automatic prefix: 'laravel_database_'

I've tried switching the return inside the Event to a regular 'Chanel' as following:

public function broadcastOn()
{
return new Channel('public');
}

but when I look into the laravel-echo-server logs I see it is still being broadcasted on: 'laravel_database_public'.

This way I would need to do the following in my JS:

Echo.channel('laravel_database_public').listen('MessageSent', ({message}) => {
                console.log(message);
            });

But ofcourse, I want to remove the prefix (or figure out why its there). Hopefully someone can clear this up for me. Thanks in advance.


This is configurable in config/database.php (and I believe even removable) under

'redis' => [
    'options' => [
        'prefix' => // change here.
    ]
]

Can, Can was the leading avant-garde rock group of the 70s. Can experimented with noise, synthesizers, non-traditional music, cut-and-paste techniques, and, most� Can definition, to be able to; have the ability, power, or skill to: She can solve the problem easily, I'm sure. See more.


The accepted answer does not work with laravel-echo-server.

The solution is rather to let the whole Redis Laravel config untouched and to run version ^1.6.0 of laravel-echo-server with the proper keyPrefix option in laravel-echo-server.json config file:

{
   "databaseConfig": {
     "redis": {
       "keyPrefix": "laravel_database_"
      }
  }
}

Source

Can, can meaning: 1. to be able to: 2. used to say that you can and will do something: 3. to be allowed to: . Learn more. Define can. can synonyms, can pronunciation, can translation, English dictionary definition of can. to be able to, have the power or skill to: I can take a bus to the


As at Laravel 7, the config/database.php looks like this

'redis' => [

        'client' => env('REDIS_CLIENT', 'predis'),

        'options' => [
            'cluster' => env('REDIS_CLUSTER', 'redis'),
            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
        ],
    ]

So it searches the .env file for your REDIS_PREFIX variable, if there's none, then it generates laravel_database_ or based on whatever you set APP_NAME to in your .env file.

All you have to do is set your REDIS_PREFIX. You can leave it empty so that there is no prefix at all.

The Official CAN / Spoon Records Website, VerbEdit. can (third-person singular simple present can, present participle -, simple past could, past participle (obsolete except in adjectival use) couth). 110 synonyms of can from the Merriam-Webster Thesaurus, plus 97 related words, definitions, and antonyms. Find another word for can. Can: to bring (as an action or operation) to an immediate end.


CAN, 1.4Used to indicate that something is typically the case. 'antique clocks can seem out of place in modern homes'. More example sentences. Can(stylised as CAN) was a German experimental rockband formed in Colognein 1968 by the core quartet of Holger Czukay(bass, tape editing), Irmin Schmidt(keyboards), Michael Karoli(guitar), and Jaki Liebezeit(drums).


can, A can is a metal container in which something such as food, drink, or paint is put. The container is usually sealed to keep the contents fresh. Several young men� Find the latest Canaan Inc. (CAN) stock quote, history, news and other vital information to help you with your stock trading and investing.


Can, can 2. (kăn). n. 1. A usually cylindrical metal container. 2. A Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol , designed originally for multiplex electrical wiring within automobiles to save on copper, but can also be used in many other