You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.2 KiB
49 lines
1.2 KiB
<?php
|
|
/*
|
|
* @Descripttion:
|
|
* @version:
|
|
* @Author: GuaPi
|
|
* @Date: 2021-07-29 10:40:49
|
|
* @LastEditors: GuaPi
|
|
* @LastEditTime: 2021-08-09 17:42:12
|
|
*/
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\ContractPosition;
|
|
use App\Models\InsideTradeOrder;
|
|
use App\Models\TestTradeOrder;
|
|
use App\Observers\ContractPositionObserver;
|
|
use App\Observers\InsideTradeOrderObserver;
|
|
use App\Observers\TestTradeOrderObserver;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
app('api.exception')->register(function (\Exception $exception) {
|
|
$request = \Illuminate\Http\Request::capture();
|
|
return app('App\Exceptions\Handler')->render($request, $exception);
|
|
});
|
|
|
|
InsideTradeOrder::observe(InsideTradeOrderObserver::class);
|
|
ContractPosition::observe(ContractPositionObserver::class);
|
|
// TestTradeOrder::observe(TestTradeOrderObserver::class);
|
|
}
|
|
}
|
|
|