Small updates for 3.9.1

This commit is contained in:
James Cole
2016-06-06 20:25:01 +02:00
parent 8091dbfdfa
commit 08ff08685c
3 changed files with 7 additions and 2 deletions

View File

@@ -32,10 +32,11 @@ class ConnectTransactionToPiggyBank
*/
public function handle(TransactionStored $event): bool
{
echo '<pre>';
/** @var PiggyBankRepositoryInterface $repository */
$repository = app(PiggyBankRepositoryInterface::class);
$transaction = $event->transaction;
$piggyBank = $repository->find($transaction['piggy_bank_id']);
// valid piggy:

View File

@@ -34,6 +34,10 @@ class UpdateJournalConnection
{
$journal = $event->journal;
if (!$journal->isTransfer()) {
return true;
}
// get the event connected to this journal:
/** @var PiggyBankEvent $event */
$event = PiggyBankEvent::where('transaction_journal_id', $journal->id)->first();