public function gallery_like() { try { $this->throwMsgCheck('is_post', 'is_login', 'is_active'); lib()->load('Gallery'); $g = new Gallery(); $g->like(req()->post('id'), login_user()->getId()); $this->rt_msg['status'] = true; } catch (\Exception $ex) { $this->rt_msg['msg'] = $ex->getMessage(); $this->rt_msg['code'] = $ex->getCode(); } }