/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(Member $memberObj, Request $request) { $this->validate($request, $this->rules); $inputArr = Input::all(); $socialSiteArr = $inputArr['site']; $categoryIdArr = $inputArr['category_id']; Member::saveMemberCategoryIds($categoryIdArr, $memberObj->id); $inputArr = array_except($inputArr, '_method', 'site', 'category_id'); $memberObj->update($inputArr); Member::saveMemberSocialIds($socialSiteArr, $memberObj->id); return Redirect::route('members.edit', [$memberObj->id])->with('message', 'Member updated.'); }