/**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(Variable $variable, Request $request)
 {
     $input = array_except($request->all(), ['_method', '_token']);
     //need to update data value sources?
     if ($request->has("fk_dsr_id")) {
         Variable::updateSource($variable->id, $request->get("fk_dsr_id"));
     }
     $variable->update($input);
     Cache::flush();
     return redirect()->route('variables.show', $variable->id)->with('message', 'Variable updated.');
 }