예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $v = $this->validator($request->all());
     if ($v->fails()) {
         return redirect()->back()->withErrors($v->errors())->withInput();
     } else {
         if (FixedCost::create($request->all())) {
             //SE REGISTRA LA ACTIVIDAD EN LA BITACORA
             $this->binnacle("REGISTRÓ NUEVO GASTO FIJO");
         }
         Session::flash('message', 'Gasto Fijo creado correctamente');
         return Redirect::to('/fixedcost/create');
     }
 }