From 799a4cba125e5839234d05eadbda514287d08b61 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 26 Dec 2020 20:18:48 -0700 Subject: [PATCH] Update LikeController, store status_profile_id and is_comment attributes --- app/Http/Controllers/LikeController.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Http/Controllers/LikeController.php b/app/Http/Controllers/LikeController.php index 60128617..df6ed286 100644 --- a/app/Http/Controllers/LikeController.php +++ b/app/Http/Controllers/LikeController.php @@ -43,6 +43,15 @@ class LikeController extends Controller if($like->wasRecentlyCreated == true) { $count++; $status->likes_count = $count; + $like->status_profile_id = $status->profile_id; + $like->is_comment = in_array($status->type, [ + 'photo', + 'photo:album', + 'video', + 'video:album', + 'photo:video:album' + ]) == false; + $like->save(); $status->save(); LikePipeline::dispatch($like); }