I have a php script locate at the root directory of my laravel project. I want to access my settings in my .env
I've tried
$dbname = env('DB_DATABASE');
$user = env('DB_USERNAME');
$host = env('DB_HOST');
$pass = env('DB_PASSWORD');
I got
PHP Fatal error: Call to undefined function env()
What is the workaround for that ? Should I include anything to be able to access env()?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire