| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\common\controller;
- use CasbinAdapter\Think\Facades\Casbin;
- use Lettered\Support\Auth as IAuth;
- use think\App;
- class AdminController extends BaseController
- {
- protected $enforcer = null;
- /**
- * @var IAuth|null
- */
- protected $auth = null;
- /**
- * AdminController constructor.
- * @param App|null $app
- * @throws \Casbin\Exceptions\CasbinException
- */
- public function __construct(App $app = null)
- {
- parent::__construct($app);
- $this->enforcer = new Casbin();
- $this->auth = new IAuth();
- }
- }
|