best way imho is to set it in you server config per virtual host (or htaccess)
for Apache
SetEnv VARIABLE_NAME variable_value
for Nginx
fastcgi_param VARIABLE_NAME variable_value;
I'm not a htaccess guru so i need to ask this,
how can i set SERVER_NAME as the variable_value?
So if i access domain1.com VARIABLE_NAME to be domain1.com?
And to be wildcard. So i don't need to add 100 domains to htaccess
Thanks
zenry said:
best way imho is to set it in you server config per virtual host (or htaccess)
for Apache
SetEnv VARIABLE_NAME variable_value
for Nginx
fastcgi_param VARIABLE_NAME variable_value;
you can always do something like this, though it doesn't make sense in my opinion
boostrap/start.php
$env = $app->detectEnvironment(function() {
return $_SERVER['SERVER_NAME'] ?: 'local';
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community