<?php
namespace App\Http\Controllers\Api\v1;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Service\v1\ApiService;
use App\Http\Controllers\Service\v1\AreaService;
use App\Http\Controllers\Service\v1\AuthService;
use App\Http\Controllers\Service\v1\DatabaseService;
use App\Http\Controllers\Service\v1\FileService;
use App\Http\Controllers\Service\v1\LogService;
use App\Http\Controllers\Service\v1\OauthService;
use App\Http\Controllers\Service\v1\PushService;
use App\Http\Controllers\Service\v1\RequestAuthService;
use App\Http\Controllers\Service\v1\RoleService;
use App\Http\Controllers\Service\v1\SendEMailService;
use App\Http\Controllers\Service\v1\SystemConfigService;
use App\Http\Controllers\Service\v1\UserCenterService;
use App\Http\Controllers\Service\v1\UserService;
use App\Http\Controllers\Service\v1\TimeLineService;
use Illuminate\Http\Request;
class BaseController extends Controller
{
protected $authService;
protected $timeLineService;
protected $logService;
protected $areaService;
protected $sendEMailService;
protected $userService;
protected $roleService;
protected $requestAuthService;
protected $fileService;
protected $systemConfigService;
protected $pushService;
protected $apiService;
protected $oAuthService;
protected $userCenterService;
protected $databaseService;
protected $post;
public function __construct(Request $request)
{
date_default_timezone_set('Asia/Shanghai');
$this->authService = AuthService::getInstance();
$this->timeLineService = TimeLineService::getInstance();
$this->logService = LogService::getInstance();
$this->areaService = AreaService::getInstance();
$this->sendEMailService = SendEMailService::getInstance();
$this->userService = UserService::getInstance();
$this->roleService = RoleService::getInstance();
$this->requestAuthService = RequestAuthService::getInstance();
$this->fileService = FileService::getInstance();
$this->systemConfigService = SystemConfigService::getInstance();
$this->pushService = PushService::getInstance();
$this->apiService = ApiService::getInstance();
$this->oAuthService = OauthService::getInstance();
$this->userCenterService = UserCenterService::getInstance();
$this->databaseService = DatabaseService::getInstance();
$this->post = $request->post();
unset($this->post['token']);
}
}