This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
<?php
namespace Modules\Cms\Providers;
use Illuminate\Support\ServiceProvider;
class CmsServiceProvider extends ServiceProvider
{
/**
* @var string $moduleName
*/
protected string $moduleName = 'Cms';
/**
* @var string $moduleNameLower
*/
protected string $moduleNameLower = 'cms';
/**
* Boot the application events.
* @return void
*/
public function boot()
{
$this->loadMigrationsFrom(module_path($this->moduleName, 'Database/Migrations'));
}
/**
* Register the service provider.
* @return void
*/
public function register()
{
$this->registerConfig();
$this->app->register(RouteServiceProvider::class);
}
/**
* Register config.
* @return void
*/
protected function registerConfig()
{
$this->publishes([
module_path($this->moduleName, 'Config/config.php') => config_path($this->moduleNameLower . '.php'),
], 'config');
$this->mergeConfigFrom(
module_path($this->moduleName, 'Config/config.php'), $this->moduleNameLower
);
}
/**
* Get the services provided by the provider.
* @return array
*/
public function provides(): array
{
return [];
}
}