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
1 changed files with 2 additions and 1 deletions

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'));
}