I would like to read some data from the file .env
on page .blade.php
, but some do not work, for example, I'm 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
is set to the following values
PUSHER_APP_ID = minhaid
PUSHER_APP_KEY = minhachave
PUSHER_APP_SECRET = minhasenha
PUSHER_APP_CLUSTER = us2
An excerpt from my broadcasting.php
file looks like this:
return [
'default' => env('BROADCAST_DRIVER', 'null'),
'key' => env('PUSHER_APP_KEY'),
An excerpt from my file database.ph
p looks like this:
return [
'base' => env('DB_HOST', '127.0.0.1'),
/* ... */
Only the return from database.php
works in the example above, I can not read data from broadcast
. How do I read from file .env
?