FIX: convert / to DIRECTORY_SEPARATOR for gallery and contact form

This commit is contained in:
Michal Kváček
2016-04-04 10:59:52 +02:00
parent 08cb40b004
commit 8a33f1b4c7
2 changed files with 15 additions and 19 deletions
@@ -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');
}
/**