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()
|
protected function registerConfig()
|
||||||
{
|
{
|
||||||
$this->publishes([
|
$config = __DIR__ . '/../Config/config.php';
|
||||||
__DIR__ . '/../Config/config.php' => config_path('staticpages.php'),
|
$this->publishes([$config => config_path('staticpages.php')]);
|
||||||
]);
|
$this->mergeConfigFrom($config, 'staticpages');
|
||||||
$this->mergeConfigFrom(__DIR__ . '/../Config/config.php', 'staticpages');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,12 +108,9 @@ class StaticPagesServiceProvider extends ServiceProvider
|
|||||||
public function registerViews()
|
public function registerViews()
|
||||||
{
|
{
|
||||||
$viewPath = base_path('resources/views/modules/staticpages');
|
$viewPath = base_path('resources/views/modules/staticpages');
|
||||||
|
|
||||||
$sourcePath = __DIR__ . '/../Resources/views';
|
$sourcePath = __DIR__ . '/../Resources/views';
|
||||||
|
|
||||||
$this->publishes([
|
$this->publishes([$sourcePath => $viewPath]);
|
||||||
$sourcePath => $viewPath
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
||||||
return $path . '/modules/staticpages';
|
return $path . '/modules/staticpages';
|
||||||
|
|||||||
Reference in New Issue
Block a user