REFACTORING: refactor code a little bit.
Removed redundant empty lines, merging config made little bit "cleaner"
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user