12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace App\Http\Controllers;
- use App\Http\Controllers\Traits\ApiResponseTrait;
- use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
- use Illuminate\Foundation\Bus\DispatchesJobs;
- use Illuminate\Foundation\Validation\ValidatesRequests;
- class AdminController extends Controller
- {
- use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
- use ApiResponseTrait;
- // 接口响应
- /**
- * 店铺基本信息
- * @var array
- */
- protected $shop = null;
- public function __construct()
- {
- }
- /**
- * 获取当前登陆用户权限ID
- * @return int|mixed
- */
- function getRoleId()
- {
- $admin_user = request()->admin_user;
- return empty($admin_user['role_id'])?0:$admin_user['role_id'];
- }
- }
|