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];