Handle missing logo file

This commit is contained in:
Hillel Coren 2017-04-30 12:16:10 +03:00
parent 7a06989689
commit ad8bd3eda5
2 changed files with 5 additions and 1 deletions

View File

@ -58,6 +58,10 @@ trait HasLogo
$disk = $this->getLogoDisk(); $disk = $this->getLogoDisk();
if (! $disk->exists($this->logo)) {
return null;
}
return $disk->get($this->logo); return $disk->get($this->logo);
} }

View File

@ -28,7 +28,7 @@ class AppServiceProvider extends ServiceProvider
$contents = $image; $contents = $image;
} }
return 'data:image/jpeg;base64,' . base64_encode($contents); return $contents ? 'data:image/jpeg;base64,' . base64_encode($contents) : '';
}); });
Form::macro('nav_link', function ($url, $text) { Form::macro('nav_link', function ($url, $text) {