Database [] not configured Laravel 5
<p>I create new db in phpmyadmin and new tables.</p>

<p>Then i do</p>

<pre><code>    public function next(Request $request){
    $langs = DB::connection('mydb')-&gt;select('select * from lang');
    }
</code></pre>

<p>and get</p>

<pre><code>Database [compgen] not configured.
</code></pre>

<p>in my .env</p>

<pre><code>DB_HOST=localhost
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=123
</code></pre>

<p>in my config/database.php</p>

<pre><code>        'mysql' =&gt; [
        'driver'    =&gt; 'mysql',
        'host'      =&gt; env('DB_HOST', 'localhost'),
        'database'  =&gt; env('DB_DATABASE', 'test'),
        'username'  =&gt; env('DB_USERNAME', 'root'),
        'password'  =&gt; env('DB_PASSWORD', '123'),
        'charset'   =&gt; 'utf8',
        'collation' =&gt; 'utf8_unicode_ci',
        'prefix'    =&gt; 'test_',
        'strict'    =&gt; false,
    ],
</code></pre>