Some more catches and small tweaks for issue #6. [skip ci]

This commit is contained in:
James Cole
2014-08-14 07:40:15 +02:00
parent 2b42cb8ef3
commit 5f710f4c23
6 changed files with 128 additions and 60 deletions

View File

@@ -111,7 +111,7 @@ class PiggybankController extends BaseController
$data['order'] = 0;
$piggyBank = $this->_repository->store($data);
if ($piggyBank->validate()) {
if (!is_null($piggyBank->id)) {
Session::flash('success', 'New piggy bank "' . $piggyBank->name . '" created!');
return Redirect::route('piggybanks.index');