Minor fixes for paths in hosted
This commit is contained in:
parent
119b07fe03
commit
183e8ac36f
2 changed files with 6 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ namespace App\Mail\Engine;
|
|||
use App\DataMapper\EmailTemplateDefaults;
|
||||
use App\Models\Account;
|
||||
use App\Utils\Helpers;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
|
||||
|
|
@ -77,7 +78,10 @@ class PaymentEmailEngine extends BaseEmailEngine
|
|||
|
||||
$this->payment->invoices->each(function ($invoice){
|
||||
|
||||
$this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first())]);
|
||||
if(Ninja::isHosted())
|
||||
$this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first(), 'url', true)]);
|
||||
else
|
||||
$this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first())]);
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ class Invoice extends BaseModel
|
|||
if(Ninja::isHosted() && $portal && Storage::disk(config('filesystems.default'))->exists($file_path)){
|
||||
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
|
||||
}
|
||||
elseif(Ninja::isHosted() && $portal){
|
||||
elseif(Ninja::isHosted()){
|
||||
$file_path = CreateEntityPdf::dispatchNow($invitation, config('filesystems.default'));
|
||||
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue