I am new to PHP and trying to call reCaptcha API in CraftCMS. I have the following variable:
$captcha = Craft::$app->getRequest()->getParam('g-recaptcha-response');
But I get the following error when I submit a form:
Fatal error: Uncaught Error: Class 'Craft' not found
How can I import the Craft class?