public static function checkLiked($post_id, $user_id) { $result = LikeEvent::where('post_id', $post_id)->where('user_id', $user_id)->first(); if ($result) { return true; } else { return false; } //trigger to notification board }