first version
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Services\WechatService;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionsHandler;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -17,6 +18,9 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
$this->app->bind(ExceptionsHandler::class, \App\Exceptions\ExceptionsHandler::class);
|
||||
|
||||
// 单例:测试通过 setHttpClient() 注入 Mock 后,控制器解析到同一实例
|
||||
$this->app->singleton(WechatService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user