intervention/imagecache implementation

This commit is contained in:
Burak Çakırel
2020-07-22 12:46:23 +03:00
parent d934bc419e
commit bc2f2793c5
4 changed files with 334 additions and 39 deletions

View File

@ -32,9 +32,11 @@ class Logo
$path = base_path('public/img/company.png');
}
$width = $height = setting('invoice.logo_size', 128);
$image = Image::cache(function($image) use ($path) {
$width = $height = setting('invoice.logo_size', 128);
$image = Image::make($path)->resize($width, $height)->encode()->getEncoded();
$image->make($path)->resize($width, $height)->encode();
});
if (empty($image)) {
return $logo;