diff --git a/app/Services/HashtagService.php b/app/Services/HashtagService.php new file mode 100644 index 000000000..6a40595d3 --- /dev/null +++ b/app/Services/HashtagService.php @@ -0,0 +1,32 @@ + $tag->name, + 'slug' => $tag->slug, + ]; + }); + } + + public static function count($id) + { + return Cache::remember('services:hashtag:count:by_id:' . $id, 3600, function() use($id) { + return StatusHashtag::whereHashtagId($id)->count(); + }); + } + +}