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; }
public static function instance() { if (!self::$singleton) { $instance = new self(); $instance->config = Config::get('captcha::config'); $instance->assets = __DIR__ . '/../../../public/assets'; $instance->fonts = $instance->assets('fonts'); $instance->backgrounds = $instance->assets('backgrounds'); self::$singleton = $instance; } return self::$singleton; }