Merge branch 'dev' into test.customwristbands.cz

This commit is contained in:
peter
2016-04-04 11:02:48 +02:00
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');
}
/**
@@ -1,5 +1,6 @@
<?php namespace Modules\Gallery\Providers;
use App\Handlers\Registrators\TemplateRegistrator;
use Illuminate\Support\ServiceProvider;
use Symfony\Component\Process\Exception\InvalidArgumentException;
@@ -31,7 +32,6 @@ class GalleryServiceProvider extends ServiceProvider
*/
public function register()
{
//
}
/**
@@ -42,9 +42,9 @@ class GalleryServiceProvider extends ServiceProvider
protected function registerConfig()
{
$this->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');
}
}