mercredi 21 juin 2017

Detect laravel environment

I am using following code:

    if (App::environment('local')){
        \Log::info("I'm on local\n");
    }else {
        \Log::info("I'm on " . App::environment());
    }

My .env file is:

APP_ENV=local
APP_DEBUG=true
.......
...............

On code execution it throws exception:

production.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Uncaught TypeError: Argument 1 passed to Snuba\Exceptions\Handler::report() must be an instance of Exception



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2rPsmnn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire