Update FollowerController

This commit is contained in:
Daniel Supernault 2019-02-24 22:57:22 -07:00
parent c3aa407b9a
commit d1d8fa4acd
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -8,7 +8,7 @@ use App\{
Profile,
UserFilter
};
use Auth;
use Auth, Cache;
use Illuminate\Http\Request;
use App\Jobs\FollowPipeline\FollowPipeline;
@ -67,5 +67,8 @@ class FollowerController extends Controller
$follower = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->firstOrFail();
$follower->delete();
}
Cache::forget('profile:followers:'.$target->id);
Cache::forget('profile:following:'.$user->id);
}
}