mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
472 B
PHP
22 lines
472 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
use Illuminate\Support\Facades\Redis;
|
|
use App\Hashtag;
|
|
use App\StatusHashtag;
|
|
use App\HashtagFollow;
|
|
|
|
class HashtagFollowService
|
|
{
|
|
const FOLLOW_KEY = 'pf:services:hashtag-follows:v1:';
|
|
|
|
public static function getPidByHid($hid)
|
|
{
|
|
return Cache::remember(self::FOLLOW_KEY . $hid, 86400, function() use($hid) {
|
|
return HashtagFollow::whereHashtagId($hid)->pluck('profile_id')->toArray();
|
|
});
|
|
}
|
|
}
|