Using Securimage captcha with Laravel 5.3 : <p>I installed a laravel package for securimage captcha, everything seems to be fine(as in it show the random captcha), but even after putting the correct text, it still says invalid.
can someone help me please.
Here is my code</p>

<pre><code>Route::any('/test-captcha', function (){
    if (Request::getMethod() == 'POST')
    {
        $rules = ['captcha' =&gt; 'required|captcha'];

        $validator = Validator::make(Input::all(), $rules);
        if ($validator-&gt;fails())
        {
            echo '&lt;p style="color: #ff0000;"&gt;Incorrect!&lt;/p&gt;';
        }
        else
        {
            echo '&lt;p style="color: #00ff30;"&gt;Matched :)&lt;/p&gt;';
        }
    }

    $form = '&lt;form method="post" action="test-captcha"&gt;';
    $form .= '&lt;input type="hidden" name="_token" value="' . csrf_token() . '"&gt;';
    $form .= '&lt;p&gt;' . captcha_img() . '&lt;/p&gt;';
    $form .= '&lt;p&gt;&lt;button type="submit" name="check"&gt;Check&lt;/button&gt;&lt;/p&gt;';
    $form .= '&lt;/form&gt;';
    return $form;
});
</code></pre>
