S
S
Sunnat Abdukhalilov2019-01-12 11:53:52
Yii
Sunnat Abdukhalilov, 2019-01-12 11:53:52

Installing a captcha calculator, how to set it up?

There is a form for sending messages on the site. I wanted to add a captcha, and found a captcha calculator.
Here it is: https://github.com/hreitsma/yii2-simplemath-captcha
I installed everything through the composer I
still don’t understand how to set it all up, according to the instructions, the first code must be inserted into the controller. But how could I not understand.
tell me how to set it up correctly.
don't drink too much. just let me know please. because only in practice I can understand what's what

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2019-01-13
@webinar

according to the instructions, the first code must be inserted into the controller. But how could I not understand.

Just take it and insert it as it is written in the instructions
public function actions()
{
  return [
            'captcha' => [
                'class' => 'hr\captcha\CaptchaAction',
                'operators' => ['+','-','*'],
                'maxValue' => 10,
                'fontSize' => 18,
            ],
  ];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question