From d34eb425b0ad5e62e9fbd15a7962a1c94fd4caa3 Mon Sep 17 00:00:00 2001
From: Daniel Supernault <danielsupernault@gmail.com>
Date: Mon, 21 Jan 2019 12:18:08 -0700
Subject: [PATCH] Update Media Model

---
 app/Media.php | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/app/Media.php b/app/Media.php
index 79e399ea1..2b77abe43 100644
--- a/app/Media.php
+++ b/app/Media.php
@@ -17,6 +17,16 @@ class Media extends Model
      */
     protected $dates = ['deleted_at'];
 
+    public function status()
+    {
+        return $this->belongsTo(Status::class);
+    }
+
+    public function profile()
+    {
+        return $this->belongsTo(Profile::class);
+    }
+
     public function url()
     {
         if(!empty($this->remote_media) && $this->remote_url) {
@@ -37,6 +47,11 @@ class Media extends Model
         return url($url);
     }
 
+    public function thumb()
+    {
+        return $this->thumbnailUrl();
+    }
+
     public function mimeType()
     {
         return explode('/', $this->mime)[0];