Database [] not configured Laravel 5

前端 未结 6 955
闹比i
闹比i 2021-01-08 00:59

I create new db in phpmyadmin and new tables.

Then i do

    public function next(Request $request){
    $langs = DB::connection(\'mydb\')->select(         


        
6条回答
  •  长情又很酷
    2021-01-08 01:43

    I struggled with this error for a few hours and found out solution that works for me. If you can not delete cache with php artisan config:cache because it throws error after you run it:

    [InvalidArgumentException]

    Database [] not configured

    And if you are sure that your connections parameters are good then try manually delete bootstrap cache config files which are placed in app/bootstrap/cache folder. Hope it helps someone.

提交回复
热议问题