Modules.php 550 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Author: 芸众商城 www.yunzshop.com
  4. * Date: 2017/5/31
  5. * Time: 下午4:40
  6. */
  7. namespace app\common\models;
  8. class Modules extends BaseModel
  9. {
  10. public $table = 'modules';
  11. public static function getModuleName($name)
  12. {
  13. return self::where('name', $name)
  14. ->where('type', 'biz')
  15. ->first();
  16. }
  17. public static function getModuleInfo($name)
  18. {
  19. return self::select('name', 'title', 'version')->where('name', $name)
  20. ->where('type', 'biz')
  21. ->first();
  22. }
  23. }