/** * Show the form for editing the specified resource. * * @return Response */ public function edit() { $balance = Balance::orderBy('id', 'desc')->first(); if (!$balance) { $balance = new Balance(); $balance->amount = '0'; } $balance->save(); return View::make('transactions.panels.balance')->with('balance'); }