Can now successfully act on reminders.

This commit is contained in:
James Cole
2015-03-08 20:20:58 +01:00
parent d9028ed9b7
commit 5218443678
7 changed files with 30 additions and 6 deletions

View File

@@ -238,7 +238,6 @@ class TransactionController extends Controller
public function store(JournalFormRequest $request, JournalRepositoryInterface $repository)
{
$journalData = [
'what' => $request->get('what'),
'description' => $request->get('description'),
@@ -260,6 +259,12 @@ class TransactionController extends Controller
event(new JournalSaved($journal));
event(new JournalCreated($journal, intval($request->get('piggy_bank_id'))));
if(intval($request->get('reminder_id')) > 0) {
$reminder = Auth::user()->reminders()->find($request->get('reminder_id'));
$reminder->active = 0;
$reminder->save();
}
Session::flash('success', 'New transaction "' . $journal->description . '" stored!');
if (intval(Input::get('create_another')) === 1) {