示例#1
0
 public static function instance()
 {
     if (!LaravelCaptcha::$singleton) {
         self::$config = Config::get('laravel-captcha::config');
         LaravelCaptcha::$singleton = new LaravelCaptcha();
     }
     return LaravelCaptcha::$singleton;
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app['captcha'] = $this->app->share(function ($app) {
         return LaravelCaptcha::instance();
     });
 }