Example #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $eventId, $tableId)
 {
     $table = Table::findOrFail($tableId);
     $input = Input::except('token');
     $validator = $table->getValidator($input);
     if ($validator->fails()) {
         return $this->respondInvalidData($validator->errors());
     }
     $table->fill($input);
     $table->save();
     return $this->respondUpdateSuccess('Table: ' . $table->table_name . ' updated');
 }