Use App::runningInConsole method

This commit is contained in:
printempw 2018-02-14 13:45:17 +08:00
parent f73758ea25
commit 77f828c817

View File

@ -55,7 +55,7 @@ class BootServiceProvider extends ServiceProvider
// check database config
Database::prepareConnection();
} catch (\Exception $e) {
if (PHP_SAPI == "cli") {
if ($this->app->runningInConsole()) {
// dump some useful information for debugging
dump([
'APP_ENV' => app()->environment(),