Example #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param Requests\UpdateMemberRequest|Request $request
  * @param Member $member
  * @return \Illuminate\Http\Response
  */
 public function update(Requests\UpdateMemberRequest $request, Member $member)
 {
     $input = $request->all();
     if (isset($input['loot']) && $input['loot'] != '0') {
         $member->loot()->attach($input['loot'], ['awarded_at' => $input['awarded_at']]);
         unset($input['loot']);
     }
     $member->update($input);
     return redirect('members');
 }