This commit is contained in:
baodev0
2026-08-04 17:18:15 +07:00
parent ad743d3767
commit a83fb1d8d3
24 changed files with 520 additions and 1 deletions
@@ -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'));
}
}