2016-12-24 70 views
3

當我試圖像運行命令 -爲什麼我laravel應用程序總是在生產心情

php artisan db:seed 

跟它 -

************************************** 
*  Application In Production!  * 
************************************** 

Do you really wish to run this command? (yes/no) [no]: 

我.ENV文件說 -

.... 
APP_ENV=local 
APP_KEY=... 
APP_DEBUG=true 
APP_LOG_LEVEL=debug 
APP_URL=http://localhost 
.... 

我的app.php文件說

... 
'env' => env('APP_ENV', 'local'), 
... 

我的laravel版本是5.3。

我應該怎樣做才能在開發模式下運行應用程序?

+0

在命令行中的有哪些呢'回聲$ APP_ENV'(或Windows上的'echo%APP_ENV%')顯示? – patricus

+0

使用windows。回聲%APP_ENV%返回%APP_ENV%。當我運行「php artisan env」時,它返回「當前應用程序環境:生產」 –

回答

1

您的設置是正確的。嘗試清除配置緩存:

php artisan config:cache 
+0

仍存在問題。我在Windows 10環境中使用netbeans。在運行命令後重新啓動apache服務器。 :( –

+0

如何從文件資源管理器手動刪除此文件:'bootstrap/cache/config.php' –

+0

在我的項目中bootstrap/cache文件夾中沒有config.php –

0

請在終端上運行命令或在cmd

php artisan up 

它會你,在維護模式

+0

那沒用; –

+0

Then可能是你的env文件中的一些錯誤,請發佈你的env文件,可能會有所幫助 –

相關問題