LeaseToySet.php 699 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\common\services\plugin\leasetoy;
  3. use app\common\components\BaseController;
  4. /**
  5. * Author: 芸众商城 www.yunzshop.com
  6. * Date: 2018/3/19
  7. */
  8. class LeaseToySet extends BaseController
  9. {
  10. protected $leaseToy;
  11. function __construct()
  12. {
  13. parent::__construct();
  14. $this->leaseToy = \Setting::get('plugin.lease_toy');
  15. }
  16. //是否开启
  17. public static function whetherEnabled()
  18. {
  19. $leaseToy = \Setting::get('plugin.lease_toy');
  20. if (app('plugins')->isEnabled('lease-toy')) {
  21. if ($leaseToy['is_lease_toy']) {
  22. return $leaseToy['is_lease_toy'];
  23. }
  24. }
  25. return 0;
  26. }
  27. }