Jiang Qinghua 4 жил өмнө
parent
commit
be01f1ceb8

+ 3 - 3
src/Traits/Resizable.php

@@ -17,7 +17,7 @@ trait Resizable
     public function thumbnail($type, $attribute = 'image', $disk = null)
     {
         // Return empty string if the field not found
-        if (!isset($this->attributes[$attribute])) {
+        if (! isset($this->attributes[$attribute])) {
             return '';
         }
 
@@ -43,9 +43,9 @@ trait Resizable
         $ext = pathinfo($image, PATHINFO_EXTENSION);
 
         // 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
-        return $name . '-' . $type . '.' . $ext;
+        return $name.'-'.$type.'.'.$ext;
     }
 }