update
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user