public function storeTransfer() { if (Input::has('conversation_id')) { $online_users = OnlineUsers::find(Input::get('conversation_id')); ThreadMessages::where('thread_id', $online_users->thread_id)->where('sender_id', $online_users->operator_id)->update(['sender_id' => Input::get('operator')]); $online_users->company_id = Input::get('company'); $online_users->department_id = Input::get('department'); $online_users->operator_id = Input::get('operator'); $online_users->save(); RecentActivities::createActivity("Online Conversation transferred by User ID:" . Auth::user()->id . " User Name:" . Auth::user()->name); Session::flash('success_msg', trans('msgs.conversation_transfer_success')); return Redirect::to('/conversations/all'); } else { Session::flash('error_msg', trans('msgs.cannot_transfer_ticket')); return Redirect::back(); } }