title: Laravel using multiple databases (2 MySQL, 1 SQLite)
body: <p>I'm developing a project where I need to use multiple databases in Laravel. The first database works like a charm (MySQL) but I can't get the framework to recognize the SQLite DB. The error that shows up is this:</p>
  
  <blockquote>
    <p>Illuminate \ Database \ QueryException
    Database (sqlite) does not exist. (SQL: PRAGMA foreign_keys = ON;)</p>
  </blockquote>
  
  <p>Here is my .env</p>
  
  <pre><code>DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=sitio1
  DB_USERNAME=root
  DB_PASSWORD=
  
  DB_CONNECTION_SECOND=sqlite
  DB_DATABASE_SECOND=/Users/imac/CleverOctopusBDD/database/Sitio2.sqlite
  DB_USERNAME_SECOND=root
  DB_PASSWORD_SECOND=
  </code></pre>
  
  <p>and here is my database.php</p>
  
  <pre><code>'default' =&gt; env('DB_CONNECTION', 'mysql'),
  
  'connections' =&gt; [
  
      'sqlite' =&gt; [
          'driver' =&gt; 'sqlite',
          'url' =&gt; env('DATABASE_URL'),
          'database' =&gt; env('DB_CONNECTION_SECOND', database_path('Sitio2.sqlite')),
          'prefix' =&gt; '',
          'foreign_key_constraints' =&gt; env('DB_FOREIGN_KEYS', true),
      ],
  
      'mysql' =&gt; [
          'driver' =&gt; 'mysql',
          'url' =&gt; env('DATABASE_URL'),
          'host' =&gt; env('DB_HOST', '127.0.0.1'),
          'port' =&gt; env('DB_PORT', '3306'),
          'database' =&gt; env('DB_DATABASE', 'sitiocentral'),
          'username' =&gt; env('DB_USERNAME', 'root'),
          'password' =&gt; env('DB_PASSWORD', ''),
          ]) : [],
      ],
  </code></pre>
  
  <p>And the location of my .sqlite file is this -> database -> Sitio2.sqlite</p>
  
  <p>I've doing some research and I don't really know what am I doing wrong. If you are wondering, this is how one of my sqlite db model looks... </p>
  
  <pre><code>class Client2 extends Model
  {
      protected $connection = 'sqlite';
  
      protected $fillable = [
          'name', 'email', 'phone', 'address'
      ];
  
      protected $table = 'Client2';
      protected $primaryKey = 'idClient';
      public $timestamps = false;
  }
  </code></pre>
  
  <p>I hope you can help me out here because I have found information about multiple MySQL connections but not with SQLite, I appreciate any tips given.</p>
  
  <p>EDIT: I just needed to pass the full path to 'database' => env('DB_DATABASE_SECOND', database_path('Sitio2.sqlite')),</p>