check system using file disk type

This commit is contained in:
raishvaria
2020-12-08 15:07:57 +05:30
parent f18eac2001
commit 419104a4ec
4 changed files with 19 additions and 6 deletions

View File

@ -375,10 +375,10 @@ class Payment extends Model implements HasMedia
$logo = $company->getMedia('logo')->first();
$isLocal = $logo->disk == 'local' || $logo->disk == 'public';
$isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem() ;
$isLocalhost = config('session.domain') === 'localhost';
if ($logo && $isLocalhost && $isLocal) {
if ($logo && $isLocalhost && $isSystem) {
$logo = $logo->getPath();
} else if($logo) {
$logo = $logo->getFullUrl();