src/Security/CSRFProtection.php
protected function extractToken()
    {
        if ($this->request->input('token') === false) {
            if (!$this->request->getHeader('X-JS-CLIENTS-TOKEN')) {
                return 'token';
            }

            return $this->request->getHeader('X-JS-CLIENTS-TOKEN');
        }

        return $this->request->input('token');
    }
protected function extractToken()
    {
        if ($this->request->input('token') === false) {
            if (!$this->request->getHeader('X-JS-CLIENTS-TOKEN')) {
                return 'token';
            }

            return $this->request->getHeader('X-JS-CLIENTS-TOKEN');
        }

        return $this->request->input('token');
    }
protected function extractToken ( ) { if ( $ this -> request -> input ( 'token' ) === false ) { if ( ! $ this -> request -> getHeader ( 'X-JS-CLIENTS-TOKEN' ) ) { return 'token' ; } return $ this -> request -> getHeader ( 'X-JS-CLIENTS-TOKEN' ) ; } return $ this -> request -> input ( 'token' ) ; }
extract token from form or JavaScript Clients like Axios, Ajax, JQuery.

@return bool|string|string[]
extract token from form or JavaScript Clients like Axios Ajax JQuery .