1. 修復倉庫統計數據加總與樣式。 2. 修正可用庫存計算邏輯(排除不可銷售倉庫)。 3. 撥補單商品列表加入批號與效期顯示。 4. 修正撥補單儲存邏輯以支援精確批號轉移。 5. 整合 FEATURES.md 至 README.md。
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\File;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class ModuleServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$modulesPath = app_path('Modules');
|
|
|
|
if (File::exists($modulesPath)) {
|
|
$modules = File::directories($modulesPath);
|
|
|
|
foreach ($modules as $module) {
|
|
// $moduleName = basename($module);
|
|
// Load Routes
|
|
$routesPath = $module . '/Routes/web.php';
|
|
if (File::exists($routesPath)) {
|
|
Route::middleware('web')
|
|
->group($routesPath);
|
|
}
|
|
|
|
// Load Service Provider
|
|
$moduleName = basename($module);
|
|
$providerClass = "App\\Modules\\{$moduleName}\\{$moduleName}ServiceProvider";
|
|
|
|
if (class_exists($providerClass)) {
|
|
$this->app->register($providerClass);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|