2016-05-23 7 views
2

Ich habe ein Problem mit Lumen der Ausnahme Debug-Ausgabe. Ich habe den Debug-Modus aktiviert, aber es scheint nicht richtig zu funktionieren.Lumen 5.2 Debug-Modus funktioniert nicht

Meine config/app.php:

<?php 
return [ 

    /* 
    |-------------------------------------------------------------------------- 
    | Encryption Key 
    |-------------------------------------------------------------------------- 
    | 
    | This key is used by the Illuminate encrypter service and should be set 
    | to a random, 32 character string, otherwise these encrypted strings 
    | will not be safe. Please do this before deploying an application! 
    | 
    */ 
    'env' => 'local', 
    'debug' => true, 

    'key' => env('APP_KEY', 'SomeRandomString!!!'), 

    'cipher' => 'AES-256-CBC', 

    /* 
    |-------------------------------------------------------------------------- 
    | Application Locale Configuration 
    |-------------------------------------------------------------------------- 
    | 
    | The application locale determines the default locale that will be used 
    | by the translation service provider. You are free to set this value 
    | to any of the locales which will be supported by the application. 
    | 
    */ 
    'locale' => env('APP_LOCALE', 'en'), 
    /* 
    |-------------------------------------------------------------------------- 
    | Application Fallback Locale 
    |-------------------------------------------------------------------------- 
    | 
    | The fallback locale determines the locale to use when the current one 
    | is not available. You may change the value to correspond to any of 
    | the language folders that are provided through your application. 
    | 
    */ 
    'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 

]; 

In bootstrap.php ich habe

$app->configure('app'); 

Also, ich cheked - die Konfigurationsdatei erfolgreich geladen wird.

Aber wenn meine App wirft eine Ausnahme Lumen nur ausgegeben - "Hoppla, sieht aus wie etwas schief gelaufen ist."

Es gibt keine Debug-Informationen.

Was ist das Problem?

P.S Ich möchte keine .env-Konfigurationsdatei verwenden.

Antwort

0

Können Sie weitere Informationen aus Ihrem Protokoll aufstellen?

Wie für Konfigurationsdatei

Lumen wird mit Dotenv configure Dateien zu verwalten. Die Standardkonfigurationsdatei .env wird in Bootstrap/app.php geladen, wie:

(new Dotenv\Dotenv($your_config_file_real_path, $your_config_file_name))->load(); 

Hinweis:

(new Dotenv\Dotenv(__DIR__.'/../'))->load(); 

Daher können Sie Ihre eigene Konfigurationsdatei Pfad und Namen von definieren können Sie mehrere verwenden Konfigurationsdateien, wenn Sie wollen, indem Sie verschiedene Dateien laden wie:

(new Dotenv\Dotenv($your_config_file_real_path1, $your_config_file_name1))->load(); 
(new Dotenv\Dotenv($your_config_file_real_path2, $your_config_file_name2))->load(); 
Verwandte Themen