<?php
 namespace App\Modules\Base; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Session; use TechOnline\Laravel\Http\Request; use TechSoft\Laravel\Member\Traits\MemberUserTrait; use TechSoft\Laravel\Oauth\OauthType; class BaseMobileController extends Controller { use MemberUserTrait; protected $alias = null; public function __construct() { $this->alias = Request::instance()->route('alias'); if ($memberUser = Session::get('_memberUser')) { $memberUser['alias'] = '0'; Session::set('_memberUser', $memberUser); } $this->memberUserSetup(); if (method_exists($this, 'settingSetUp')) { $this->settingSetUp(); } } protected function getUserLoginUrl($memberUserId) { return '/m/user_oauth_login_' . $memberUserId . '_' . OauthType::WECHAT_MOBILE . '?redirect=' . urlencode(Request::currentPageUrl()); } protected function userId() { return $this->memberUserId(); } }