bindings, function($sql, $binding) { return preg_replace('/\?/', is_numeric($binding) ? $binding : sprintf("'%s'", $binding), $sql, 1); }, $query->sql); \Log::info($sql); });*/ //自动载入路由 $func = new \ReflectionClass(get_class($this)); $path = str_replace($func->getShortName() . '.php', '', $func->getFileName()); $routesFile = $path . '../' . $this->routes; if (file_exists($routesFile)) { require $routesFile; } if (! isset($this->app['blade.compiler'])) { $this->app['view']; } parent::boot(); } /** * 注册 */ public function register() { //基础服务 $this->registerBaseService(); //文档模块 $this->app->register(DocServiceProvider::class); // 接口模块 $this->app->register(ApiServiceProvider::class); //注册定时任务模块 $this->app->register(TaskServiceProvider::class); $this->app->register(BasicServiceProvider::class); } // 注册基础服务 public function registerBaseService() { // redis服务 $this->app->register(RedisServiceProvider::class); // 短信服务 // $this->app->register(AliyunsmsServiceProvider::class); // 授权验证 $this->app->register(AuthServiceProvider::class); } }