1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 00:35:59 +00:00

Update AdminController

This commit is contained in:
Daniel Supernault 2019-02-10 18:00:05 -07:00
parent 67983516ea
commit 549ce89b4b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -43,7 +43,7 @@ class AdminController extends Controller
public function home()
{
$data = Cache::remember('admin:dashboard:home:data', 1, function() {
$data = Cache::remember('admin:dashboard:home:data', 15, function() {
return [
'failedjobs' => [
'count' => PrettyNumber::convert(FailedJob::where('failed_at', '>=', \Carbon\Carbon::now()->subDay())->count()),
@ -100,6 +100,7 @@ class AdminController extends Controller
$dir = $request->query('dir') ?? 'desc';
$stats = $this->collectUserStats($request);
$users = User::withCount('statuses')->orderBy($col, $dir)->paginate(10);
return view('admin.users.home', compact('users', 'stats'));
}