1

I am writing my code on Nitrous.IO using Laravel I configured my start.php to the following

$env = $app->detectEnvironment(array(

    'local' => array('harrenhal-php-95199'),
  'staging' => array('*.herokuapp.com'),

));

I tried this format I also tried the hostname itself both seems not to working. is there a specific practice to do so?

Once I run hostname on the shell in heroku I get this result "9e7831e0-284c-48b8-88a4-3afbbbac0b35" which changes over time.

the problem php don't detect herokuapp.com so the staging environment doesn't work

0

1 Answer 1

1

From the Laravel docs

If you need more flexible environment detection, you may pass a Closure to the detectEnvironment method, allowing you to implement environment detection however you wish

$env = $app->detectEnvironment(function()
{
    return $_SERVER['MY_LARAVEL_ENV'];
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.