EasySmsServiceProvider.php 607 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Providers;
  3. use Overtrue\EasySms\EasySms;
  4. use Illuminate\Support\ServiceProvider;
  5. class EasySmsServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * Bootstrap the application services.
  9. *
  10. * @return void
  11. */
  12. public function boot()
  13. {
  14. //
  15. }
  16. /**
  17. * Register the application services.
  18. *
  19. * @return void
  20. */
  21. public function register()
  22. {
  23. $this->app->singleton(EasySms::class, function ($app) {
  24. return new EasySms(config('easysms'));
  25. });
  26. $this->app->alias(EasySms::class, 'easysms');
  27. }
  28. }