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

View file

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