registerTranslations(); $this->registerConfig(); $this->registerViews(); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); } public function register(): void { // } protected function registerTranslations(): void { $langPath = resource_path('lang/modules/calllogs'); if (is_dir($langPath)) { $this->loadTranslationsFrom($langPath, 'calllogs'); } else { $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'calllogs'); } } protected function registerConfig(): void { $this->publishes([ __DIR__ . '/../Config/config.php' => config_path('calllogs.php'), ], 'config'); $this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'calllogs'); } protected function registerViews(): void { $viewPath = resource_path('views/modules/calllogs'); $sourcePath = __DIR__ . '/../Resources/views'; $this->publishes([$sourcePath => $viewPath], 'views'); $this->loadViewsFrom(array_merge( array_map(fn($p) => $p . '/modules/calllogs', \Config::get('view.paths')), [$sourcePath] ), 'calllogs'); } }