title: ErrorException Array to string conversion after command php artisan make:middleware Cors [Laravel]
body: <p>I try to run command <code>php artisan make:middleware Cors</code></p>
  <p>But I got this error after that</p>
  <pre><code>   ErrorException 
  
    Array to string conversion
  
      372▕         $config = $this-&gt;laravel['config'];
      373▕
      374▕         $provider = $config-&gt;get('auth.guards.'.$config-&gt;get('auth.defaults.guard').'.provider');
      375▕
    ➜ 376▕         return $config-&gt;get(&quot;auth.providers.{$provider}.model&quot;);        
  
    1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError()
  
    2   Illuminate\Console\GeneratorCommand::userProviderModel()
  </code></pre>
  <p>My providers array from config/auth.php is</p>
  <pre><code>'providers' =&gt; [
                  'users' =&gt; [
                      'driver' =&gt; 'eloquent',
                      'model' =&gt; App\Models\User::class,
                  ],
              ],
  </code></pre>
  <p>My guards array from config/auth.php is</p>
  <pre><code>    'guards' =&gt; [
          'web' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; [
                  'users' =&gt; [
                      'driver' =&gt; 'eloquent',
                      'model' =&gt; App\Models\User::class,
                  ],
              ],
          ],
  
          'api' =&gt; [
              'driver' =&gt; 'passport',
              'provider' =&gt; 'users',
              'hash' =&gt; false,
          ],
      ],
  </code></pre>
  <p>What is the solution?</p>