public function update(array $data, $ruleId)
 {
     $keywordRule = KeywordRule::find($ruleId);
     $keywordRule->rule_name = $data['rule_name'];
     $keywordRule->wechat_id = $data['wechat_id'];
     $keywordRule->match_type = $data['match_type'];
     $keywordRule->rule_type = $data['rule_type'];
     $keywordRule->save();
     return $keywordRule;
 }
示例#2
0
 public function replyType($wechatId, $type)
 {
     $keyword_rules = KeywordRule::with(['keywords', 'reply.text'])->where('wechat_id', '=', $wechatId)->Orderby('created_at', 'DESC')->paginate(15);
     return view('ucenter.public.reply.type', compact('keyword_rules'));
 }