title: Laravel 'could not find driver (SQL: insert into...'
body: <p>I'm trying to set up a development environment after not having done web dev in over a year. I've installed php 7.2.7 on my computer, then installed composer and WAMP. </p>
  
  <p>I'm using <strong><em>php artisan serve</em></strong> to set up a local server. I'm trying to create a new user in my database's 'users' table, using the following code in my web.php (routes) file.</p>
  
  <pre><code>Route::get('/new', function(){
    User::create([
      'password' =&gt; Hash::make('anything'),
      'firstname' =&gt; 'Nick',
      'lastname' =&gt; 'xyz',
      'email' =&gt; 'xyz@ph.com',
      'roleflag' =&gt; 0
    ]);
  });
  </code></pre>
  
  <p>But am getting the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/E6q5t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E6q5t.png" alt="enter image description here"></a></p>
  
  <p>This seems to be a pretty common error, and I have found help on other stackoverflow/laracasts posts such as:</p>
  
  <p><a href="https://stackoverflow.com/questions/25329302/laravel-error-pdoexception-could-not-find-driver-in-postgresql">Laravel: Error [PDOException]: Could not Find Driver in PostgreSQL</a></p>
  
  <p>and</p>
  
  <p><a href="https://laracasts.com/discuss/channels/general-discussion/cant-connect-to-sql-server-could-not-find-driver" rel="nofollow noreferrer">https://laracasts.com/discuss/channels/general-discussion/cant-connect-to-sql-server-could-not-find-driver</a></p>
  
  <p>I've thus uncommented the two lines from my php.ini file, changed my .env and config/database.php file to have appropriate settings/connection values, etc. but still receive this error.</p>
  
  <p>Relevant config.php code:</p>
  
  <pre><code>'mysql' =&gt; [
      'driver' =&gt; 'mysql',
      'host' =&gt; env('DB_HOST', '127.0.0.1'),
      'port' =&gt; env('DB_PORT', '3306'),
      'database' =&gt; env('venturebreeder', 'forge'),
      'username' =&gt; env('root', 'forge'),
      'password' =&gt; env('', ''),
      'unix_socket' =&gt; env('DB_SOCKET', ''),
      'charset' =&gt; 'utf8mb4',
      'collation' =&gt; 'utf8mb4_unicode_ci',
      'prefix' =&gt; '',
      'strict' =&gt; true,
      'engine' =&gt; null,
  ],
  </code></pre>
  
  <p>I'm a bit slower at troubleshooting since it has been a while since I've done this -- can anyone see what I'm doing wrong? Help much appreciated.</p>