StringsServiceProvider.php 677 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Songshenzong\Support;
  3. use Illuminate\Support\ServiceProvider;
  4. /**
  5. * Class StringsServiceProvider
  6. *
  7. * @package Songshenzong\Support
  8. */
  9. class StringsServiceProvider extends ServiceProvider
  10. {
  11. /**
  12. * Indicates if loading of the provider is deferred.
  13. *
  14. * @var bool
  15. */
  16. protected $defer = false;
  17. /**
  18. * Register the service provider.
  19. *
  20. * @return void
  21. */
  22. public function register()
  23. {
  24. $this->app->singleton(
  25. 'Strings',
  26. static function () {
  27. return new Strings();
  28. }
  29. );
  30. $this->app->alias('Strings', StringsFacade::class);
  31. }
  32. }