title: Laravel not setting session, set_cookie is missing from response header
body: <p>After form submission, it shows "419|page expired." I used <code>@csrf</code> in the form and its working on my local server. However, I am facing the issue on the live server. Any help? I have three types of users and implemented multi auth for them. The form doesn't even post to the Controller. </p>
  
  <p><strong>config/auth.php</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>return [
      'defaults' =&gt; [
          'guard' =&gt; 'vendor',
          'passwords' =&gt; 'vendors',
      ],
      'guards' =&gt; [
          'admin' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; 'admins',
          ],
          'manager' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; 'managers',
          ],
          'vendor' =&gt; [
              'driver' =&gt; 'session',
              'provider' =&gt; 'vendors',
          ],
          'api' =&gt; [
              'driver' =&gt; 'token',
              'provider' =&gt; 'users',
              'hash' =&gt; false,
          ],
      ],
      'providers' =&gt; [
          'admins' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Admin::class,
          ],
          'managers' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Manager::class,
          ],
          'vendors' =&gt; [
              'driver' =&gt; 'eloquent',
              'model' =&gt; App\Vendor::class,
          ],
      ],
      'passwords' =&gt; [
          'admins' =&gt; [
              'provider' =&gt; 'admins',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 60,
          ],
          'managers' =&gt; [
              'provider' =&gt; 'managers',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 60,
          ],
          'vendors' =&gt; [
              'provider' =&gt; 'vendors',
              'table' =&gt; 'password_resets',
              'expire' =&gt; 60,
          ],
      ],
  ];
  </code></pre>
  
  <p><strong>RedirectedIfAuthenticated.php</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  public function handle($request, Closure $next, $guard = null)
  {
      switch ($guard) {
          case 'admin':
              if (Auth::guard($guard)-&gt;check()) {
                  return redirect()-&gt;route('admin.dashboard');
              }
              break;
          case 'manager':
              if (Auth::guard($guard)-&gt;check()) {
                  return redirect()-&gt;route('manager.dashboard');
              }
              break;
          case 'vendor':
              if (Auth::guard($guard)-&gt;check()) {
                  return redirect()-&gt;route('vendor.dashboard');
              }
              break;
  
          default:
              if (Auth::guard($guard)-&gt;check()) {
                  return redirect('/home');
              }
              break;
      }
  
      return $next($request);
  }
  </code></pre>