AppService.php 337 B

123456789101112131415161718192021222324
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app;
  4. use library\utils\Json;
  5. use think\Service;
  6. /**
  7. * 应用服务类
  8. */
  9. class AppService extends Service
  10. {
  11. public function register()
  12. {
  13. // 服务注册
  14. $this->app->bind('json', Json::class);
  15. }
  16. public function boot()
  17. {
  18. // 服务启动
  19. }
  20. }