1
0
Fork 0

Update AccountController

This commit is contained in:
Daniel Supernault 2018-11-24 23:43:06 -07:00
parent c40b4f5cfd
commit 20fa6fd8e7
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 6 additions and 12 deletions

View File

@ -204,12 +204,9 @@ class AccountController extends Controller
]);
$pid = $user->id;
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
return UserFilter::whereUserId($pid)
->whereFilterableType('App\Profile')
->whereIn('filter_type', ['mute', 'block'])
->pluck('filterable_id')->toArray();
});
Cache::forget("user:filter:list:$pid");
Cache::forget("feature:discover:people:$pid");
Cache::forget("feature:discover:posts:$pid");
return redirect()->back();
}
@ -256,12 +253,9 @@ class AccountController extends Controller
]);
$pid = $user->id;
Cache::remember("user:filter:list:$pid", 1440, function() use($pid) {
return UserFilter::whereUserId($pid)
->whereFilterableType('App\Profile')
->whereIn('filter_type', ['mute', 'block'])
->pluck('filterable_id')->toArray();
});
Cache::forget("user:filter:list:$pid");
Cache::forget("feature:discover:people:$pid");
Cache::forget("feature:discover:posts:$pid");
return redirect()->back();
}