Example #1
0
 /**
  * 获取活动评论
  */
 public function comment()
 {
     //获取活动id
     $id = $this->request->get('id');
     //根据活动id获取相关评论
     $comments = ActivityComment::select('id', 'mobile', 'content', 'customer_id', 'customer_name', 'customer_avatar', 'created_at', 'reply_customer_id', 'reply_customer_name')->where('activity_id', $id)->orderBy('created_at', 'desc')->get()->toArray();
     return return_rest('1', compact('comments'), '操作成功');
 }
Example #2
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle()
 {
     //更新用户评论中名称
     $comment = ActivityComment::where('customer_id', $this->uid)->update(['customer_name' => $this->name]);
 }