diff --git a/app/Post.php b/app/Post.php index f76dd9e..e11db2d 100644 --- a/app/Post.php +++ b/app/Post.php @@ -12,4 +12,11 @@ class Post extends Model public function poster() { return $this->belongsTo('App\User', 'poster_id'); } + + /** + * Get the poster of the post. + */ + public function thread() { + return $this->belongsTo('App\Thread'); + } } diff --git a/resources/js/components/ThreadComponent.vue b/resources/js/components/ThreadComponent.vue index c5358fa..06a3ff8 100644 --- a/resources/js/components/ThreadComponent.vue +++ b/resources/js/components/ThreadComponent.vue @@ -3,7 +3,7 @@