LeaseToyGoods.php 691 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\services\goods;
  3. use app\common\components\BaseController;
  4. use Yunshop\LeaseToy\models\LeaseToyGoodsModel;
  5. use Setting;
  6. /**
  7. * Create 2018/3/5
  8. * Author 芸众商城 www.yunzshop.com
  9. */
  10. class LeaseToyGoods extends BaseController
  11. {
  12. public static function whetherEnabled()
  13. {
  14. $leaseToy = Setting::get('plugin.lease_toy');
  15. if (app('plugins')->isEnabled('lease-toy')) {
  16. if ($leaseToy['is_lease_toy']) {
  17. return $leaseToy['is_lease_toy'];
  18. }
  19. }
  20. return 0;
  21. }
  22. public static function getDate($goodsId)
  23. {
  24. return LeaseToyGoodsModel::whereGoodsId($goodsId)->first();
  25. }
  26. }