mewebstudio / captcha

Captcha for Laravel 5/6/7/8/9/10/11
MIT License
2.45k stars 453 forks source link

ReflectionException in Container.php line 734 #93

Open TheAliAbbasi opened 8 years ago

TheAliAbbasi commented 8 years ago

so I updated composer packages and I'm now on Laravel 5.2.41. and this exception shows up on capthcha_src() function. I was looking for the problem then I found out this:

// file: CaptchaServiceProvider.php#26
if (strpos($this->app->version(), 'Lumen') !== false) {
           $this->app->get('captcha[/{config}]', 'Mews\Captcha\LumenCaptchaController@getCaptcha');
        } else {
            if ((double) $this->app->version() >= 5.2) {
                $this->app['router']->get('captcha/{config?}', '\Mews\Captcha\CaptchaController@getCaptcha')->middleware('web');
            } else {
                $this->app['router']->get('captcha/{config?}', '\Mews\Captcha\CaptchaController@getCaptcha');
            }
        }

there's this ``middlewere('web') which is causing the problem.

TheAliAbbasi commented 8 years ago

I found out the solution on this. I upgraded from 5.1 and forgot to make the middlewareGroups.