<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Photo\Api\Controller; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Session; use ModStart\Core\Exception\BizException; use Module\Photo\Type\PhotoVisitType; class BaseController extends Controller { protected function authCheck() { if (modstart_config('modulePhotoVisitType', PhotoVisitType::VISIT_PUBLIC) == PhotoVisitType::VISIT_PASSWORD) { if (!Session::get('modulePhotoVisitAuth', false)) { BizException::throws('未授权访问'); } } return null; } }