Skip to content

Commit

Permalink
Merge pull request #29 from storyn26383/master
Browse files Browse the repository at this point in the history
fix blade directive issue
  • Loading branch information
albertcht authored Jul 3, 2017
2 parents 3975f98 + 41b33bf commit c17e232
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/InvisibleReCaptchaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ class InvisibleReCaptchaServiceProvider extends ServiceProvider
/**
* Boot the services for the application.
*
* @param BladeCompiler $blade
* @return void
*/
public function boot(BladeCompiler $blade)
public function boot()
{
$app = $this->app;
$this->bootConfig();
$this->app['validator']->extend('captcha', function ($attribute, $value) use ($app) {
return $app['captcha']->verifyResponse($value, $app['request']->getClientIp());
$this->app['validator']->extend('captcha', function ($attribute, $value) {
return $this->app['captcha']->verifyResponse($value, $this->app['request']->getClientIp());
});

$this->addBladeDirective($blade);
}

/**
Expand All @@ -39,6 +35,10 @@ public function register()
$app['config']['captcha.debug']
);
});

$this->app->resolving('view', function () {
$this->addBladeDirective($this->app['blade.compiler']);
});
}

/**
Expand Down

0 comments on commit c17e232

Please sign in to comment.