BasicServiceProvider.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: fangx
  5. * Date: 2021/7/12
  6. * Time: 11:52
  7. */
  8. namespace App\Basic\Providers;
  9. use App\Base\Providers\AppServiceProvider;
  10. use App\Basic\Facades\DictActivityTypeFacade;
  11. use App\Basic\Facades\DictColumnFacade;
  12. use App\Basic\Facades\DictCompanyCategoryFacade;
  13. use App\Basic\Facades\DictCompanyFacade;
  14. use App\Basic\Facades\DictDepartmentFacade;
  15. use App\Basic\Facades\DictExhibitionFacade;
  16. use App\Basic\Facades\DictIconFacade;
  17. use App\Basic\Facades\DictIndustryExhibitionFacade;
  18. use App\Basic\Facades\DictIndustryFacade;
  19. use App\Basic\Facades\DictJobTitleFacade;
  20. use App\Basic\Facades\DictLanguageFacade;
  21. use App\Basic\Facades\DictLocationFacade;
  22. use App\Basic\Facades\DictPlurilingualFacade;
  23. use App\Basic\Facades\DictProductFacade;
  24. use App\Basic\Facades\DictRegionFacade;
  25. use App\Basic\Facades\DictRegionLocationReFacade;
  26. use App\Basic\Facades\DictVenueFacade;
  27. use App\Basic\Facades\SyncTagFacade;
  28. use App\Basic\Facades\UrlsFacade;
  29. use App\Basic\Facades\VersionInfoFacade;
  30. use App\Basic\Services\DictActivityTypeService;
  31. use App\Basic\Services\DictColumnService;
  32. use App\Basic\Services\DictCompanyCategoryService;
  33. use App\Basic\Services\DictCompanyService;
  34. use App\Basic\Services\DictDepartmentService;
  35. use App\Basic\Services\DictExhibitionService;
  36. use App\Basic\Services\DictIconService;
  37. use App\Basic\Services\DictIndustryExhibitionService;
  38. use App\Basic\Services\DictIndustryService;
  39. use App\Basic\Services\DictJobTitleService;
  40. use App\Basic\Services\DictLanguageService;
  41. use App\Basic\Services\DictLocationService;
  42. use App\Basic\Services\DictPlurilingualService;
  43. use App\Basic\Services\DictProductService;
  44. use App\Basic\Services\DictRegionLocationReService;
  45. use App\Basic\Services\DictRegionService;
  46. use App\Basic\Services\DictVenueService;
  47. use App\Basic\Services\SyncTagService;
  48. use App\Basic\Services\UrlsService;
  49. use App\Basic\Services\VersionInfoService;
  50. class BasicServiceProvider extends AppServiceProvider
  51. {
  52. public function boot()
  53. {
  54. //sql打印 不提交
  55. /*\DB::listen(function ($query) {
  56. $sql = array_reduce($query->bindings, function($sql, $binding) {
  57. return preg_replace('/\?/', is_numeric($binding) ? $binding : sprintf("'%s'", $binding), $sql, 1);
  58. }, $query->sql);
  59. \Log::info($sql);
  60. });*/
  61. parent::boot();
  62. }
  63. /**
  64. * 注册绑定门面
  65. */
  66. public function register()
  67. {
  68. $this->app->bind(UrlsFacade::class, function () {
  69. return app()->make(UrlsService::class);
  70. });
  71. }
  72. }