reverted ec1053bb00a4c030ac9492106430dce401fbe2b4
This commit is contained in:
parent
6f8ebf91e8
commit
e0d002fbc8
@ -34,7 +34,7 @@ class CreateUser extends Job
|
||||
|
||||
// Upload picture
|
||||
if ($this->request->file('picture')) {
|
||||
$media = $this->getMedia($this->request->file('picture')[0], 'users');
|
||||
$media = $this->getMedia($this->request->file('picture'), 'users');
|
||||
|
||||
$this->user->attachMedia($media, 'picture');
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class UpdateUser extends Job
|
||||
|
||||
// Upload picture
|
||||
if ($this->request->file('picture')) {
|
||||
$media = $this->getMedia($this->request->file('picture')[0], 'users');
|
||||
$media = $this->getMedia($this->request->file('picture'), 'users');
|
||||
|
||||
$this->user->attachMedia($media, 'picture');
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ class CreateTransaction extends Job
|
||||
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment')[0], 'transactions');
|
||||
$media = $this->getMedia($this->request->file('attachment'), 'transactions');
|
||||
|
||||
$this->transaction->attachMedia($media, 'attachment');
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ class UpdateTransaction extends Job
|
||||
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment')[0], 'transactions');
|
||||
$media = $this->getMedia($this->request->file('attachment'), 'transactions');
|
||||
|
||||
$this->transaction->attachMedia($media, 'attachment');
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ class CreateCompany extends Job
|
||||
protected function updateSettings()
|
||||
{
|
||||
if ($this->request->file('logo')) {
|
||||
$company_logo = $this->getMedia($this->request->file('logo')[0], 'settings', $this->company->id);
|
||||
$company_logo = $this->getMedia($this->request->file('logo'), 'settings', $this->company->id);
|
||||
|
||||
if ($company_logo) {
|
||||
$this->company->attachMedia($company_logo, 'company_logo');
|
||||
|
@ -34,7 +34,7 @@ class CreateItem extends Job
|
||||
|
||||
// Upload picture
|
||||
if ($this->request->file('picture')) {
|
||||
$media = $this->getMedia($this->request->file('picture')[0], 'items');
|
||||
$media = $this->getMedia($this->request->file('picture'), 'items');
|
||||
|
||||
$this->item->attachMedia($media, 'picture');
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ class UpdateCompany extends Job
|
||||
}
|
||||
|
||||
if ($this->request->file('logo')) {
|
||||
$company_logo = $this->getMedia($this->request->file('logo')[0], 'settings', $this->company->id);
|
||||
$company_logo = $this->getMedia($this->request->file('logo'), 'settings', $this->company->id);
|
||||
|
||||
if ($company_logo) {
|
||||
$this->company->attachMedia($company_logo, 'company_logo');
|
||||
|
@ -36,7 +36,7 @@ class UpdateItem extends Job
|
||||
|
||||
// Upload picture
|
||||
if ($this->request->file('picture')) {
|
||||
$media = $this->getMedia($this->request->file('picture')[0], 'items');
|
||||
$media = $this->getMedia($this->request->file('picture'), 'items');
|
||||
|
||||
$this->item->attachMedia($media, 'picture');
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class CreateDocument extends Job
|
||||
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment')[0], Str::plural($this->document->type));
|
||||
$media = $this->getMedia($this->request->file('attachment'), Str::plural($this->document->type));
|
||||
|
||||
$this->document->attachMedia($media, 'attachment');
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class UpdateDocument extends Job
|
||||
\DB::transaction(function () {
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment')[0], Str::plural($this->document->type));
|
||||
$media = $this->getMedia($this->request->file('attachment'), Str::plural($this->document->type));
|
||||
|
||||
$this->document->attachMedia($media, 'attachment');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user