Database [] not configured Laravel 5

前端 未结 6 940
闹比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:49

    In my case it was a bad database username. I had it set in my config/database.php as well as the .env file and one of them was different than the other. Found this thread when searching, thought this might help someone.

提交回复
热议问题