protected function getTokenString()
    {
        $result = Request::post('_token', '');
        if ('' == $result) {
            $result = Request::get('_token', '');
        }

        if ('' == $result) {
            $result = isset($_SERVER['X-CSRF-TOKEN']) ? $_SERVER['X-CSRF-TOKEN'] : '';
        }

        return $result;
    }