|
@@ -21,25 +21,26 @@ class Controller extends BaseController
|
|
public function getUser()
|
|
public function getUser()
|
|
{
|
|
{
|
|
// $this->user = UserInfoModel::where('phone','13880642880')->first();
|
|
// $this->user = UserInfoModel::where('phone','13880642880')->first();
|
|
- $this->user = Auth::user();
|
|
|
|
|
|
+ $this->user = Auth::guard('api')->user();
|
|
return $this->user;
|
|
return $this->user;
|
|
}
|
|
}
|
|
|
|
|
|
public function __construct() {
|
|
public function __construct() {
|
|
-/*
|
|
|
|
|
|
+
|
|
$this->middleware('auth:api', [
|
|
$this->middleware('auth:api', [
|
|
- 'except' => [
|
|
|
|
|
|
+ /* 'except' => [
|
|
'upload', 'getCode', 'reset', 'login', 'get', 'register', 'alipayNotify', 'wechatpayNotify',
|
|
'upload', 'getCode', 'reset', 'login', 'get', 'register', 'alipayNotify', 'wechatpayNotify',
|
|
'get', 'area', 'get_province', 'get_city', 'get_county', 'test','/home/index'
|
|
'get', 'area', 'get_province', 'get_city', 'get_county', 'test','/home/index'
|
|
|
|
|
|
- ]
|
|
|
|
- ]);*/
|
|
|
|
|
|
+ ]*/
|
|
|
|
+ ]);
|
|
|
|
|
|
// \DB::connection()->enableQueryLog();
|
|
// \DB::connection()->enableQueryLog();
|
|
// $queries = \DB::getQueryLog();
|
|
// $queries = \DB::getQueryLog();
|
|
// dd($queries);
|
|
// dd($queries);
|
|
|
|
|
|
-// $this->_user = Auth::user();
|
|
|
|
|
|
+// $this->user = Auth::guard('api')->user();
|
|
|
|
+// dd(\Illuminate\Support\Facades\Auth::user());
|
|
// if ($this->_user !== null) {
|
|
// if ($this->_user !== null) {
|
|
// $this->_user->last_ip = Request::ip();
|
|
// $this->_user->last_ip = Request::ip();
|
|
// }
|
|
// }
|