REFACTORING: refactor code a little bit.

Removed redundant empty lines, merging config made little bit "cleaner"
This commit is contained in:
Michal Kváček
2016-03-09 22:24:01 +01:00
parent d52dcbcf55
commit 661d5c486d
@@ -95,10 +95,9 @@ class StaticPagesServiceProvider extends ServiceProvider
*/
protected function registerConfig()
{
$this->publishes([
__DIR__ . '/../Config/config.php' => config_path('staticpages.php'),
]);
$this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'staticpages');
$config = __DIR__ . '/../Config/config.php';
$this->publishes([$config => config_path('staticpages.php')]);
$this->mergeConfigFrom($config, 'staticpages');
}
/**
@@ -109,12 +108,9 @@ class StaticPagesServiceProvider extends ServiceProvider
public function registerViews()
{
$viewPath = base_path('resources/views/modules/staticpages');
$sourcePath = __DIR__ . '/../Resources/views';
$this->publishes([
$sourcePath => $viewPath
]);
$this->publishes([$sourcePath => $viewPath]);
$this->loadViewsFrom(array_merge(array_map(function ($path) {
return $path . '/modules/staticpages';