where('noteable_type', TransactionJournal::class)->first(['notes.*']); if (null !== $dbNote) { $transaction['notes'] = $dbNote->text; } Log::debug(sprintf('Notes of journal #%d refreshed.', $transaction['transaction_journal_id'])); return $transaction; } }