FEATURE: conditionally publish views in module, fix confirm dialog for forms
This commit is contained in:
@@ -13,6 +13,7 @@ abstract class ServiceProvider extends LaravelServiceProvider
|
||||
protected $defer = false;
|
||||
protected $alias = false;
|
||||
protected $path = false;
|
||||
protected $publishViews = true;
|
||||
|
||||
abstract protected function setModuleAlias();
|
||||
|
||||
@@ -59,7 +60,7 @@ abstract class ServiceProvider extends LaravelServiceProvider
|
||||
return $path . '/modules/' . $this->alias;
|
||||
}, \Config::get('view.paths')), [$sourcePath]), $this->alias);
|
||||
|
||||
if (is_dir($sourcePath)) {
|
||||
if (is_dir($sourcePath) && $this->publishViews) {
|
||||
$this->publishes([$sourcePath => $viewPath], 'module-views');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user