Transaction model and jobs added multiple attachment

This commit is contained in:
Cüneyt Şentürk
2021-02-09 11:54:53 +03:00
parent 4ef70899be
commit 305ff07ee0
3 changed files with 23 additions and 5 deletions

View File

@ -37,9 +37,11 @@ class CreateTransaction extends Job
// Upload attachment
if ($this->request->file('attachment')) {
$media = $this->getMedia($this->request->file('attachment'), 'transactions');
foreach ($this->request->file('attachment') as $attachment) {
$media = $this->getMedia($attachment, 'transactions');
$this->transaction->attachMedia($media, 'attachment');
$this->transaction->attachMedia($media, 'attachment');
}
}
// Recurring