Commit 458d8912 authored by Nguyen Van Anh's avatar Nguyen Van Anh

Use config_path

parent 9001420d
...@@ -20,6 +20,10 @@ class NoCaptchaServiceProvider extends ServiceProvider { ...@@ -20,6 +20,10 @@ class NoCaptchaServiceProvider extends ServiceProvider {
{ {
$app = $this->app; $app = $this->app;
$this->publishes([
__DIR__.'/config/captcha.php' => config_path('captcha.php')
]);
$app['validator']->extend('captcha', function($attribute, $value) use ($app) $app['validator']->extend('captcha', function($attribute, $value) use ($app)
{ {
return $app['captcha']->verifyResponse($value, $app['request']->getClientIp()); return $app['captcha']->verifyResponse($value, $app['request']->getClientIp());
...@@ -41,10 +45,6 @@ class NoCaptchaServiceProvider extends ServiceProvider { ...@@ -41,10 +45,6 @@ class NoCaptchaServiceProvider extends ServiceProvider {
*/ */
public function register() public function register()
{ {
$this->publishes([
__DIR__.'/config/captcha.php' => $this->app->configPath().'/captcha.php'
]);
$this->app->bind('captcha', function($app) $this->app->bind('captcha', function($app)
{ {
return new NoCaptcha( return new NoCaptcha(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment