|
@@ -17,7 +17,7 @@ trait Resizable
|
|
|
public function thumbnail($type, $attribute = 'image', $disk = null)
|
|
public function thumbnail($type, $attribute = 'image', $disk = null)
|
|
|
{
|
|
{
|
|
|
// Return empty string if the field not found
|
|
// Return empty string if the field not found
|
|
|
- if (!isset($this->attributes[$attribute])) {
|
|
|
|
|
|
|
+ if (! isset($this->attributes[$attribute])) {
|
|
|
return '';
|
|
return '';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -43,9 +43,9 @@ trait Resizable
|
|
|
$ext = pathinfo($image, PATHINFO_EXTENSION);
|
|
$ext = pathinfo($image, PATHINFO_EXTENSION);
|
|
|
|
|
|
|
|
// We remove extension from file name so we can append thumbnail type
|
|
// We remove extension from file name so we can append thumbnail type
|
|
|
- $name = Str::replaceLast('.' . $ext, '', $image);
|
|
|
|
|
|
|
+ $name = Str::replaceLast('.'.$ext, '', $image);
|
|
|
|
|
|
|
|
// We merge original name + type + extension
|
|
// We merge original name + type + extension
|
|
|
- return $name . '-' . $type . '.' . $ext;
|
|
|
|
|
|
|
+ return $name.'-'.$type.'.'.$ext;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|