php - Calling environment variables inside class not working -
I'm not sure why this is not working? I want to be able to access the set set in my .env.php
file, but NetBeans is showing an error that the getenv
function is not recognized.
This is my code
& lt ;? Php class Blast Extends Lectures {... Protected $ connection = getenv ('DB_NAME'); }
Set the value of the class from the manufacturer.
class Blah provides eloquent {protected $ connection = null; Function __ conversion () {$ this- & gt; Connection = getenv ('DB_NAME'); }}
Comments
Post a Comment