From d39947ed083d389ad023bc3602d614e3036bdc63 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 1 Mar 2019 22:27:43 -0700 Subject: [PATCH 1/2] Update StatusHashtag --- app/StatusHashtag.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/StatusHashtag.php b/app/StatusHashtag.php index 0f9e1a5fc..15e282025 100644 --- a/app/StatusHashtag.php +++ b/app/StatusHashtag.php @@ -6,7 +6,11 @@ use Illuminate\Database\Eloquent\Model; class StatusHashtag extends Model { - public $fillable = ['status_id', 'hashtag_id']; + public $fillable = [ + 'status_id', + 'hashtag_id', + 'profile_id' + ]; public function status() { @@ -17,4 +21,9 @@ class StatusHashtag extends Model { return $this->belongsTo(Hashtag::class); } + + public function profile() + { + return $this->belongsTo(Profile::class); + } } From e6b4e7670dcc810dda600da9b9aa08eb275023af Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 1 Mar 2019 22:28:11 -0700 Subject: [PATCH 2/2] Update StatusEntityLexer --- app/Jobs/StatusPipeline/StatusEntityLexer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Jobs/StatusPipeline/StatusEntityLexer.php b/app/Jobs/StatusPipeline/StatusEntityLexer.php index 5fe3cf34a..dd1c352a7 100644 --- a/app/Jobs/StatusPipeline/StatusEntityLexer.php +++ b/app/Jobs/StatusPipeline/StatusEntityLexer.php @@ -95,7 +95,11 @@ class StatusEntityLexer implements ShouldQueue ['name' => $tag, 'slug' => $slug] ); StatusHashtag::firstOrCreate( - ['status_id' => $status->id, 'hashtag_id' => $hashtag->id] + [ + 'status_id' => $status->id, + 'hashtag_id' => $hashtag->id, + 'profile_id' => $status->profile_id + ] ); }); }