0
I would like to read some data from the archive .env
on the page .blade.php
, but some do not work, for example, I am using the following way:
apkey: {{env('PUSHER_APP_KEY')}} #ler chave PUSHER_APP_KEY
key: {{config('database.base')}} #ler chave base do arquivo app/database.php
broadcasting:{{config('broadcasting.key')}} #ler chave key do arquivo app/broadcasting.php
Where my file .env
the following values are configured
PUSHER_APP_ID = minhaid
PUSHER_APP_KEY = minhachave
PUSHER_APP_SECRET = minhasenha
PUSHER_APP_CLUSTER = us2
An excerpt from my archive broadcasting.php
is like this:
return [
'default' => env('BROADCAST_DRIVER', 'null'),
'key' => env('PUSHER_APP_KEY'),
An excerpt from my archive database.ph
p is like this:
return [
'base' => env('DB_HOST', '127.0.0.1'),
/* ... */
Just the return of database.php
works in the above example, I cannot read the data from broadcast
. How do I read from the file .env
?
Yes. The keys were already
– adventistaam
@adventistaam is how it does and works
– novic
Yeah. They didn’t work
– adventistaam
It worked when I changed
PUSHER_APP_ID
forPUSHER_ID
– adventistaam
@adventistaam has something wrong in your project
– novic