app->singleton('ChuanglanSms', function ($app) { return new ChuanglanSmsService( Config('services.chuanglansms.default') ); }); $this->app->singleton('Sms253', function ($app) { return new ChuanglanSmsService( Config('services.chuanglansms.yingxiao') ); }); // 阿里云短信 $this->app->singleton('AliSms', function ($app) { return new AliSmsService( Config('services.alisms.access_key_id'), Config('services.alisms.access_key_secret') ); }); } /** * Register any application services. * * @return void */ public function register() { if ($this->app->environment() == 'local') { $this->app->register(IdeHelperServiceProvider::class); } } }