Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Laravel 5.4.26 reCaptcha #57

Closed
lordrost opened this issue Jul 11, 2017 · 1 comment
Closed

Multiple Laravel 5.4.26 reCaptcha #57

lordrost opened this issue Jul 11, 2017 · 1 comment
Assignees

Comments

@lordrost
Copy link

  • noCaptcha Version: 4.0.1
  • Laravel Version: 5.4.26
  • PHP Version: 7.1.5

Description:

I'm trying to implement 2 reCaptcha on the same page of my laravel project.

I'm using your code from FAQ

{{ Form::open(['method' => 'POST'])}}
    {{ Form::captcha(['id' => 'captcha1']) }}
    {{ Form::submit('Submit form 1')}}
{{ Form::close() }}

{{ Form::open(['method' => 'POST']) }}
    {{ Form::captcha(['id' => 'captcha2')] }}
    {{ Form::submit('Submit form 2')}}
{{ Form::close() }}

{{ Captcha::scriptWithCallback(['captcha1', 'captcha2']) }}

And i got

trim() expects parameter 1 to be string, array given (View: /var/www/html/resources/views

Steps To Reproduce:

Use {{ Form::captcha(['id' => 'captcha2')] }} in Laravel Project

@arcanedev-maroc
Copy link
Member

arcanedev-maroc commented Jul 11, 2017

It's {{ Form::captcha('captcha2') }} instead of {{ Form::captcha(['id' => 'captcha2']) }}.

You're passing an array instead of string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants