First basic version that "works". Now it's time to do some code cleanup. [skip ci]

This commit is contained in:
James Cole
2014-07-25 12:12:08 +02:00
parent 8338606db5
commit bcd48f2e49
6 changed files with 168 additions and 53 deletions

View File

@@ -43,6 +43,8 @@ class TransactionController extends BaseController
$budgets[0] = '(no budget)';
return View::make('transactions.create')->with('accounts', $accounts)->with('budgets', $budgets)->with(
'what', $what
);
@@ -106,14 +108,23 @@ class TransactionController extends BaseController
}
Session::flash('success', 'Transaction saved');
return Redirect::route('index');
if(Input::get('create') == '1') {
return Redirect::route('transactions.create',$what)->withInput();
} else {
return Redirect::route('index');
}
}
public function index() {
public function index()
{
$transactions = $this->_journal->paginate(25);
return View::make('transactions.index')->with('transactions',$transactions);
return View::make('transactions.index')->with('transactions', $transactions);
}
public function show($journalId)