38 lines
824 B
PHP
38 lines
824 B
PHP
<?php
|
|
|
|
namespace Modules\Menu\App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class MenuServiceProvider extends ServiceProvider
|
|
{
|
|
protected string $moduleName = 'Menu';
|
|
|
|
protected string $moduleNameLower = 'menu';
|
|
|
|
public function boot(): void
|
|
{
|
|
$this->registerConfig();
|
|
$this->registerMigrations();
|
|
$this->app->register(RouteServiceProvider::class);
|
|
}
|
|
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
protected function registerConfig(): void
|
|
{
|
|
$this->mergeConfigFrom(
|
|
module_path($this->moduleName, 'config/config.php'),
|
|
$this->moduleNameLower
|
|
);
|
|
}
|
|
|
|
protected function registerMigrations(): void
|
|
{
|
|
$this->loadMigrationsFrom(module_path($this->moduleName, 'Database/migrations'));
|
|
}
|
|
}
|