Ejemplo n.º 1
0
 protected function tokensMatch($request)
 {
     if ($request->wantsJson()) {
         return true;
     }
     return parent::tokensMatch($request);
 }
Ejemplo n.º 2
0
 protected function tokensMatch($request)
 {
     $tokenMatch = parent::tokensMatch($request);
     if ($tokenMatch) {
         $request->session()->regenerateToken();
     }
     return $tokenMatch;
 }
Ejemplo n.º 3
0
 protected function tokensMatch($request)
 {
     // Don't validate CSRF when testing.
     if (env('APP_ENV') === 'testing') {
         return true;
     }
     return parent::tokensMatch($request);
 }
Ejemplo n.º 4
0
 /**
  * Determine if the session and input CSRF tokens match.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return bool
  */
 protected function tokensMatch($request)
 {
     $tokensMatch = true;
     if (Controller::wantsHtml()) {
         $tokensMatch = parent::tokensMatch($request);
     }
     return $tokensMatch;
 }