44 lines
975 B
PHP
44 lines
975 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\AlipayService;
|
|
use App\Services\UploadService;
|
|
use App\Services\UtilService;
|
|
use App\Services\WechatPayService;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton('uploadservice', function () {
|
|
return new UploadService();
|
|
});
|
|
$this->app->singleton('wechatpayservice', function () {
|
|
return new WechatPayService();
|
|
});
|
|
$this->app->singleton('alipayservice', function () {
|
|
return new AlipayService();
|
|
});
|
|
$this->app->singleton('utilservice', function () {
|
|
return new UtilService();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
}
|
|
}
|