#add env management

This commit is contained in:
2025-08-01 16:55:23 +08:00
parent 57a4d7d97e
commit 5c4492d8f8
16 changed files with 5524 additions and 5 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Console\Commands\EnvCommand;
class EnvServiceProvider extends ServiceProvider
{
/**
* 注册服务
*/
public function register(): void
{
// 注册环境管理服务
$this->app->singleton(\App\Services\EnvService::class);
}
/**
* 启动服务
*/
public function boot(): void
{
// 注册Artisan命令
if ($this->app->runningInConsole()) {
$this->commands([
EnvCommand::class,
]);
}
}
}