title: Laravel token mismatch error after cache clear
body: <p>I am using Laravel 5.4 version </p>
  
  <p>What i eana ask when i am clear the browser cache and try to login this time it returning me the error like</p>
  
  <pre class="lang-php prettyprint-override"><code>TokenMismatchException in VerifyCsrfToken.php line 68:
  </code></pre>
  
  <p>but when i refresh it again and login it logged in successfully but whenever i clear the browser cache and try to login all the time it returning me the error. can any one please help me related this?</p>
  
  <p>code i have in my <code>v\VerifyCsrfToken.php</code> is:</p>
  
  <pre class="lang-php prettyprint-override"><code>public function handle($request, Closure $next)
  {
      if (
          $this-&gt;isReading($request) ||
          $this-&gt;runningUnitTests() ||
          $this-&gt;shouldPassThrough($request) ||
          $this-&gt;tokensMatch($request)
      ) {
          return $this-&gt;addCookieToResponse($request, $next($request));
      }
  
      throw new TokenMismatchException;
  }
  </code></pre>
  
  <p>but when i am using this code instead of laravel default :</p>
  
  <pre class="lang-php prettyprint-override"><code>public function handle($request, Closure $next)
  {
      $response = $next($request);
  
      if (last(explode('\\',get_class($response))) != 'RedirectResponse') {
          $response-&gt;header('P3P', 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
      }
  
      return $response; 
  }
  </code></pre>
  
  <p>It's working fine it means after cache clear it allow me to login without giving the token mismatch error.</p>
  
  <p>My question is i dont want to change the default code of laravel so is there any other way to solve this? </p>