protected function getTokenFromRequest(Request $request)
    {
        $token = $request->getParameter($this->key) ?: $request->getHeader('X-CSRF-TOKEN');
        
        return $token;
    }
protected function getTokenFromRequest(Request $request)
    {
        $token = $request->getParameter($this->key) ?: $request->getHeader('X-CSRF-TOKEN');
        
        return $token;
    }
protected function getTokenFromRequest ( Request $ request ) { $ token = $ request -> getParameter ( $ this -> key ) ? : $ request -> getHeader ( 'X-CSRF-TOKEN' ) ; return $ token ; }
Get the CSRF token from the request.

@param  Request $request
@return string
Get the CSRF token from the request .