/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $fixeds = FixedCost::lists('fixedcost', 'id');
     $variables = VariableCost::lists('variablecost', 'id');
     $result = Result::find($id);
     if ($result) {
         return view('result.edit', ['result' => $result, 'fixeds' => $fixeds, 'variables' => $variables]);
     } else {
         return redirect()->action('ResultController@index')->with('error', 'El resultado solicitado no existe');
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     //ELIMINA GASTO FIJO
     $fixed = FixedCost::find($id);
     if ($fixed->delete()) {
         //SE REGISTRA EL GASTO FIJO EN LA BITACORA
         $this->binnacle("ElIMINÓ GASTO FIJO");
     }
     Session::flash('message', 'El Gasto Fijo se eliminó correctamente');
     return Redirect::to('/fixedcost');
 }