How to access files from .env

MQTT_CA_CERT_PATH_PROD=/../../Cert/prod/ca-chain.crt
MQTT_CA_CERT_PATH_PROD=/../../Cert/prod/ca-chain.crt
i have given a path to a cert directory and accessing it in my config file
'MQTT_CA_CERT_PATH' => env('MQTT_CA_CERT_PATH_PROD'),
'MQTT_CA_CERT_PATH' => env('MQTT_CA_CERT_PATH_PROD'),
but gives an error ..... how to access that
No description
3 Replies
toeknee
toeknee7mo ago
you likely need an absolute server path.
GHOST-117
GHOST-117OP7mo ago
$ca_cert_path = __DIR__.config('payment.production.MQTT_CA_CERT_PATH');
$ca_cert_path = __DIR__.config('payment.production.MQTT_CA_CERT_PATH');
fixed
GHOST-117
GHOST-117OP7mo ago
got the absolute path
No description
Want results from more Discord servers?
Add your server