/** * 该用户的公司页面模块 */ public function getModules() { return ComModuleModel::whereIn('cid', [0, $this->cid])->where('isshow', 1)->get(); }
/** * 公司首页模块 */ public function modules() { return ComModuleModel::whereIn('cid', [0, $this->cid])->orderBy('sort', 'desc')->orderBy('id', 'asc')->get(); }