Browse Source

Update Media model, add thumbnailUrl method

Daniel Supernault 7 năm trước cách đây
mục cha
commit
9c9ebec1ba
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      app/Media.php

+ 7 - 0
app/Media.php

@@ -23,4 +23,11 @@ class Media extends Model
       $url = Storage::url($path);
       return url($url);
     }
+
+    public function thumbnailUrl()
+    {
+      $path = $this->thumbnail_path;
+      $url = Storage::url($path);
+      return url($url);
+    }
 }