Addon.php 478 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\storeapi\controller;
  3. class Addon extends BaseStoreApi
  4. {
  5. public function __construct()
  6. {
  7. $this->site_id = request()->siteid();
  8. }
  9. /**
  10. * 插件是否存在
  11. */
  12. public function addonIsExit()
  13. {
  14. $addon = array_filter(array_map(function($item) {
  15. if (addon_is_exit($item, $this->site_id)) return $item;
  16. }, [ 'store', 'stock' ]));
  17. return $this->response($this->success($addon));
  18. }
  19. }