Пример #1
0
 public function setReadMsgs()
 {
     $from_id = Input::get("from_id");
     $to_id = Input::get("to_id");
     $inbox_select = Inbox::select('id')->where('from_id', '=', $from_id)->where('to_id', '=', $to_id)->get();
     foreach ($inbox_select as $inbox_msg) {
         $inbox = Inbox::find($inbox_msg->id);
         $inbox->read = 1;
         $inbox->save();
     }
     return Response::json(array('validation_failed' => 0));
 }