使用sql錯誤查詢數據庫時laravel拋出Throwable接口,而不是查詢異常。 hInterface'Throwable'not found
0
A
回答
0
我和'laravel new demo'有同樣的麻煩,meybe版本庫服務器有錯誤。我今天下午用'composer create-project laravel/laravel = 5.4 demo --prefer-dist'重建了我的laravel項目,它工作正常!這樣做。
0
在我上一個項目中,我也得到了這個錯誤。我使用PHP 5.6.30版本。當我升級到7.0.1版本時,一切都很好。 http://php.net/manual/en/class.throwable.php
1
我正在使用php5.6
,並在我做了composer update
後得到了這個。
因此,我安裝了php7.1
以下這answer
然後我用
sudo a2dismod php5.6
禁用php5.6
,然後我跑到下面,使7.1
sudo a2enmod php7.1
,最後使用重新啓動的Apache2。
sudo service apache2 restart
它工作。
0
我修好了我的netstat -tln,發現mysql正在運行0:0:0:0:3306,並且在我的.env文件中設置爲DB_HOST = 127.0.0.1。我將其更改爲DB_HOST = localhost,現在工作正常。
相關問題
- 1. found/not found found with shared_ptr指示
- 2. Select2 with AJAX always not found found
- 3. iOS Cotains-based Predicate search only only when found match found found
- 4. OrientDB'engine'remote'was found'
- 5. NoReverseMatch found
- 6. Property'collectionView'and'photos'not found
- 7. Xamarin.Android.Support.Compat not found
- 8. iOS Receipt not found
- 9. Spring:application-context.xml not found
- 10. sqlsrv_connect()not found
- 11. finfo path not found
- 12. @Autowired bean not found
- 13. mkvirtualenv:command not found
- 14. FreeImage library not found
- 15. -bash:tsc:command not found
- 16. Geckodriver not found
- 17. 「3706 provider not found」
- 18. Vows:command not found
- 19. bin/sh:opt:command not found
- 20. bash:print:command not found
- 21. rake:command not found
- 22. AWTUtilities not found
- 23. centos7「export:command not found
- 24. sudo:docker-compose:command not found
- 25. Zenity list found results
- 26. PHP「Exception not found」
- 27. Python:「IOError:C not found」
- 28. akka.dispatch.Future not found
- 29. java.lang.Exception:TestComplete/TestExecute not found
- 30. Selenium junit.framework.AssertionFailedError:No Tests Found
你可以發佈你的代碼嗎? –
錯誤是:'Class'App \ Http \ Controllers \ Info \ DB'找不到' –
謝謝@AlessandroL。我已經上傳了正確的屏幕截圖。 –