Support any bill in any range.

This commit is contained in:
James Cole
2015-03-03 17:40:17 +01:00
parent 65a5107854
commit 0619adb0cd
5 changed files with 113 additions and 57 deletions

View File

@@ -12,6 +12,7 @@ use Redirect;
use Session;
use URL;
use View;
use Input;
/**
* Class BillController
@@ -168,6 +169,10 @@ class BillController extends Controller
$bill = $repository->store($billData);
Session::flash('success', 'Bill "' . e($bill->name) . '" stored.');
if (intval(Input::get('create_another')) === 1) {
return Redirect::route('bills.create')->withInput();
}
return Redirect::route('bills.index');
}
@@ -195,6 +200,10 @@ class BillController extends Controller
$bill = $repository->update($bill, $billData);
if (intval(Input::get('return_to_edit')) === 1) {
return Redirect::route('bills.edit', $bill->id);
}
Session::flash('success', 'Bill "' . e($bill->name) . '" updated.');
return Redirect::route('bills.index');