title: Database (database/database.sqlite) does not exist. Database works from artisan tinker
body: <p>I created my database.sqlite file in the <code>database</code> folder. My <code>.env</code> file contents are : </p>
  
  <pre><code>DB_CONNECTION=sqlite
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=absolute\path\to\database\database.sqlite
  DB_USERNAME=admin
  DB_PASSWORD=
  </code></pre>
  
  <p>When I run <code>php artisan tinker</code> and <code>DB::table('users')-&gt;get();</code> I get the info from the database. </p>
  
  <p>My DatabaseController is:</p>
  
  <pre><code>class DatabaseController extends Controller
  {
      public function main()
      {
          $users = DB::table('users')-&gt;get();
  
          return view('database',compact($users));
      }
  }
  </code></pre>
  
  <p>Yet when I request <code>/database</code> path I get the error:</p>
  
  <p><code>QueryException in Connection.php line 647:
  Database (database/database.sqlite) does not exist. (SQL: select * from "users")</code></p>
  
  <p>UPDATE:
  A temporary fix is to change the database.php from the <code>config</code> folder:</p>
  
  <pre><code>  'connections' =&gt; [
  
      'sqlite' =&gt; [
          'driver' =&gt; 'sqlite',
          'database' =&gt; 'absolute\path\database\database.sqlite', 
          'prefix' =&gt; '',
      ],
  </code></pre>
  
  <p>Instead of using <code>env('DB_DATABASE', database_path('database.sqlite'))</code>, which returns <code>database/database.sqlite</code> not my absolute path.</p>