public static function instance() { if (!Captcha::$singleton) { self::$config = Config::get('captcha::config'); self::$assets = __DIR__ . '/../../../public/assets/'; self::$fonts = self::assets('fonts'); self::$backgrounds = self::assets('backgrounds'); Captcha::$singleton = new Captcha(); } return Captcha::$singleton; }
/** * Register the service provider. * * @return void */ public function register() { $this->app['captcha'] = $this->app->share(function ($app) { return Captcha::instance(); }); }