AdminController.php 623 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\common\controller;
  3. use CasbinAdapter\Think\Facades\Casbin;
  4. use Lettered\Support\Auth as IAuth;
  5. use think\App;
  6. class AdminController extends BaseController
  7. {
  8. protected $enforcer = null;
  9. /**
  10. * @var IAuth|null
  11. */
  12. protected $auth = null;
  13. /**
  14. * AdminController constructor.
  15. * @param App|null $app
  16. * @throws \Casbin\Exceptions\CasbinException
  17. */
  18. public function __construct(App $app = null)
  19. {
  20. parent::__construct($app);
  21. $this->enforcer = new Casbin();
  22. $this->auth = new IAuth();
  23. }
  24. }