mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
fix localhost img display issue
This commit is contained in:
@ -375,10 +375,16 @@ class Payment extends Model implements HasMedia
|
||||
|
||||
$logo = $company->getMedia('logo')->first();
|
||||
|
||||
if ($logo) {
|
||||
$isLocal = $logo->disk == 'local' || $logo->disk == 'public';
|
||||
$isLocalhost = env('SESSION_DOMAIN') === 'localhost';
|
||||
|
||||
if ($logo && $isLocalhost && $isLocal) {
|
||||
$logo = $logo->getPath();
|
||||
} else if($logo) {
|
||||
$logo = $logo->getFullUrl();
|
||||
}
|
||||
|
||||
|
||||
view()->share([
|
||||
'payment' => $this,
|
||||
'company_address' => $this->getCompanyAddress(),
|
||||
|
||||
Reference in New Issue
Block a user