diff --git a/modules/ContactForm/Providers/ContactFormServiceProvider.php b/modules/ContactForm/Providers/ContactFormServiceProvider.php index 395675b3..e43f3772 100644 --- a/modules/ContactForm/Providers/ContactFormServiceProvider.php +++ b/modules/ContactForm/Providers/ContactFormServiceProvider.php @@ -45,9 +45,9 @@ class ContactFormServiceProvider extends ServiceProvider protected function registerConfig() { $this->publishes([ - __DIR__ . '/../Config/config.php' => config_path('contactform.php'), + __DIR__ . DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Config'.DIRECTORY_SEPARATOR.'config.php' => config_path('contactform.php'), ]); - $this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'contactform'); + $this->mergeConfigFrom(__DIR__ . DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Config'.DIRECTORY_SEPARATOR.'config.php', 'contactform'); } /** @@ -57,14 +57,13 @@ class ContactFormServiceProvider extends ServiceProvider */ public function registerViews() { - $viewPath = base_path('resources/views/modules/contactform'); - - $sourcePath = __DIR__ . '/../Resources/views'; + $viewPath = base_path('resources'.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'contactform'); + $sourcePath = __DIR__ . DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'views'; $this->publishes([$sourcePath => $viewPath]); $this->loadViewsFrom(array_merge(array_map(function ($path) { - return $path . '/modules/contactform'; + return $path . DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'contactform'; }, \Config::get('view.paths')), [$sourcePath]), 'contactform'); /** @@ -91,7 +90,7 @@ class ContactFormServiceProvider extends ServiceProvider */ public function registerTranslations() { - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'contactform'); + $this->loadTranslationsFrom(__DIR__ . DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'lang', 'contactform'); } /** diff --git a/modules/Gallery/Providers/GalleryServiceProvider.php b/modules/Gallery/Providers/GalleryServiceProvider.php index a1dc7ea8..ac6ab8df 100644 --- a/modules/Gallery/Providers/GalleryServiceProvider.php +++ b/modules/Gallery/Providers/GalleryServiceProvider.php @@ -1,5 +1,6 @@ publishes([ - __DIR__ . '/../Config/config.php' => config_path('gallery.php'), + __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'config.php' => config_path('gallery.php'), ]); - $this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'gallery'); + $this->mergeConfigFrom(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'config.php', 'gallery'); } /** @@ -54,16 +54,13 @@ class GalleryServiceProvider extends ServiceProvider */ public function registerViews() { - $viewPath = base_path('resources/views/modules/gallery'); + $viewPath = base_path('resources' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'gallery'); + $sourcePath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . 'views'; - $sourcePath = __DIR__ . '/../Resources/views'; - - $this->publishes([ - $sourcePath => $viewPath - ]); + $this->publishes([$sourcePath => $viewPath]); $this->loadViewsFrom(array_merge(array_map(function ($path) { - return $path . '/modules/gallery'; + return $path . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'gallery'; }, \Config::get('view.paths')), [$sourcePath]), 'gallery'); /** @@ -90,12 +87,12 @@ class GalleryServiceProvider extends ServiceProvider */ public function registerTranslations() { - $langPath = base_path('resources/lang/modules/gallery'); + $langPath = base_path('resources' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'gallery'); if (is_dir($langPath)) { $this->loadTranslationsFrom($langPath, 'gallery'); } else { - $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'gallery'); + $this->loadTranslationsFrom(__DIR__ . DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'lang', 'gallery'); } }