Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar

composer require biscolab/laravel-recaptcha

When trying to install biscolab/laravel-recaptcha I get this error messages:

D:\xampp82\htdocs\zws_admin_12>composer require biscolab/laravel-recaptcha ./composer.json has been updated Running composer update biscolab/laravel-recaptcha Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 - biscolab/laravel-recaptcha[v1.0.0, ..., v1.0.1, v2.0.0, ..., v2.0.4] require laravel/framework 5.* -> found laravel/framework[v5.0.0, ..., v5.8.38] but it conflicts with your root composer.json require (^12.0). - biscolab/laravel-recaptcha[v3.0.0, ..., v3.6.1, 4.0.0, ..., 4.4.0] require php ^7.1 -> your php version (8.2.12) does not satisfy that requirement. - biscolab/laravel-recaptcha[5.0.0, ..., 5.2.0] require laravel/framework ^7.0|^8.0 -> found laravel/framework[v7.0.0, ..., v7.30.7, v8.0.0, ..., v8.83.29] but it conflicts with your root composer.json require (^12.0). - biscolab/laravel-recaptcha[v5.3.0, ..., v5.4.0] require illuminate/routing ^7.0|^8.0|^9.0 -> found illuminate/routing[v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require. - biscolab/laravel-recaptcha v6.0.0 requires illuminate/routing ^7.0|^8.0|^9.0|^10.0 -> found illuminate/routing[v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28] but these were not loaded, likely because it conflicts with another require. - biscolab/laravel-recaptcha v6.1.0 requires illuminate/routing ^7.0|^8.0|^9.0|^10.0|^11.0 -> found illuminate/routing[v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28, v11.0.0, ..., v11.45.0] but these were not loaded, likely because it conflicts with another require. - Root composer.json requires biscolab/laravel-recaptcha * -> satisfiable by biscolab/laravel-recaptcha[v1.0.0, v1.0.1, v2.0.0, ..., v2.0.4, v3.0.0, ..., v3.6.1, 4.0.0, ..., 4.4.0, 5.0.0, ..., v5.4.0, v6.0.0, v6.1.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require biscolab/laravel-recaptcha:*" to figure out if any version is installable, or "composer require biscolab/laravel-recaptcha:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I am using: "laravel/framework": "^12.0"

What should I do?

0 likes
1 reply
LaryAI's avatar

The error occurs because biscolab/laravel-recaptcha does not yet support Laravel 12. The latest version (as of now, v6.1.0) only supports up to Laravel 11, according to its composer.json and Packagist page.

What you can do:

  1. Wait for Official Support:
    Monitor the biscolab/laravel-recaptcha GitHub repository for Laravel 12 support. You can check issues or pull requests for updates.

  2. Use an Alternative Package:
    Consider using another package that supports Laravel 12, such as anhskohbo/no-captcha, which is widely used and may update faster.

  3. Implement reCAPTCHA Manually:
    You can integrate Google reCAPTCHA yourself without a package. Here’s a basic example for reCAPTCHA v2:

    a. Add reCAPTCHA to your form:

    <form method="POST" action="/your-form">
        @csrf
        <!-- your form fields -->
        <div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>
        <button type="submit">Submit</button>
    </form>
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
    

    b. Validate in your controller:

    use Illuminate\Http\Request;
    use Illuminate\Support\Facades\Http;
    
    public function submit(Request $request)
    {
        $request->validate([
            // your validation rules
            'g-recaptcha-response' => 'required',
        ]);
    
        $response = Http::asForm()->post('https://www.google.com/recaptcha/api/siteverify', [
            'secret' => 'YOUR_SECRET_KEY',
            'response' => $request->input('g-recaptcha-response'),
            'remoteip' => $request->ip(),
        ]);
    
        if (!$response->json('success')) {
            return back()->withErrors(['captcha' => 'reCAPTCHA verification failed.']);
        }
    
        // Continue processing
    }
    
  4. If You Must Use biscolab/laravel-recaptcha:

    • You could try forking the package and updating its composer.json to allow Laravel 12, but this is not recommended unless you are comfortable maintaining your own fork and fixing any breaking changes.

Summary:
Currently, you cannot install biscolab/laravel-recaptcha on Laravel 12. Either wait for an update, use an alternative, or implement reCAPTCHA manually as shown above.

Please or to participate in this conversation.