app->singleton(TemplateService::class, function ($app) { return new TemplateService( config('template.cache_enabled', true), config('template.cache_ttl', 3600) ); }); } public function boot(): void { $this->publishes([ __DIR__ . '/../config/template.php' => config_path('template.php'), ], 'template-config'); } }