Пример #1
0
 public function __construct()
 {
     try {
         (new Dotenv('./app'))->load();
     } catch (Exception $e) {
     }
     AppConfig::init($this->configure());
 }
Пример #2
0
 protected function getEmail()
 {
     $this->email = new PHPMailer();
     $this->email->isSMTP();
     $this->email->Host = Config::get('email.smtp.host');
     $this->email->SMTPAuth = Config::get('email.smtp.auth');
     $this->email->Username = Config::get('email.username');
     $this->email->Password = Config::get('email.password');
     $this->email->SMTPSecure = Config::get('email.smtp.secure');
     $this->email->Port = Config::get('email.smtp.port');
     $this->email->isHTML(true);
     $this->email->setFrom(Config::get('email.username'), '比乐集');
     return $this->email;
 }
Пример #3
0
 protected function getSms()
 {
     return $this->sms = (new Factory(Config::get('sms')))->get();
 }
Пример #4
0
 public function __construct()
 {
     $this->sms = (new Sms(Config::get('sms')))->get();
 }
Пример #5
0
 public static function __callStatic($method, $parameters)
 {
     static::init(Config::get('app.logger.channel'), Config::get('app.logger.filename'));
     return method_exists(static::$object, $method) && Config::get('app.logger.debug') ? call_user_func_array([static::$object, $method], $parameters) : null;
 }