Comments (3)
I changed vendor/mews/captcha/src/CaptchaServiceProvider.php file to
<?php
namespace Mews\Captcha;
use Illuminate\Support\ServiceProvider;
/**
* Class CaptchaServiceProvider
* @package Mews\Captcha
*/
class CaptchaServiceProvider extends ServiceProvider {
/**
* Boot the service provider.
*
* @return null
*/
public function boot() {
// Publish configuration files
$this->publishes([
__DIR__ . '/../config/captcha.php' => config_path('captcha.php'),
], 'config');
// HTTP routing
if (strpos($this->app->version(), 'Lumen') !== false) {
$this->app->get('captcha[/{config}]', 'Mews\Captcha\LumenCaptchaController@getCaptcha');
} else {
$this->app['router']->get('captcha/{config?}', ['middleware' => 'web', 'uses' => '\Mews\Captcha\CaptchaController@getCaptcha']); // modify here
}
// Validator extensions
$this->app['validator']->extend('captcha', function ($attribute, $value, $parameters) {
return captcha_check($value);
});
}
/**
* Register the service provider.
*
* @return void
*/
public function register() {
// Merge configs
$this->mergeConfigFrom(
__DIR__ . '/../config/captcha.php', 'captcha'
);
// Bind captcha
$this->app->bind('captcha', function ($app) {
return new Captcha(
$app['Illuminate\Filesystem\Filesystem'],
$app['Illuminate\Config\Repository'],
$app['Intervention\Image\ImageManager'],
$app['Illuminate\Session\Store'],
$app['Illuminate\Hashing\BcryptHasher'],
$app['Illuminate\Support\Str']
);
});
}
}
It works. I don't know why
from captcha.
You can try this fixed version:
https://github.com/ionesculiviucristian/captcha
from captcha.
@w3hacker your code modification has fixed the problem. Thank you very much!
Closing this now, hopefully the author will merge the edit into the code base to make it Laravel 5.2 ready.
from captcha.
Related Issues (20)
- security issue with captcha_api rule HOT 1
- Multiple captCHA codes for one page HOT 1
- Getting status code 404, not found on one of UAT server. HOT 1
- Can you please update it for Laravel 10 HOT 3
- Suggestion: implement throttling to prevent DoS
- Getting error 500 after updating to Laravel 10
- margin top issue
- Captcha img not refreshing onclick()
- Accessibility issue on a web page
- libpng warning: iCCP: known incorrect sRGB profile
- captcha-jwt
- Support for 8.2 HOT 1
- Can math add subtraction, multiplication, and division
- Support for laravel 10
- Captcha Value always gives output wrong.
- The captcha is not display image on cpanel laravel 10
- Captcha Value always gives invalid value HOT 1
- Are there plans to upgrade intervention/image to version 3.x?
- Request for Laravel 11 Support HOT 2
- An error will be prompted under window
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from captcha.