mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 23:19:05 +00:00
Code variables type declaration
This commit is contained in:
@@ -10,18 +10,17 @@ use App\Models\ReferralApply;
|
||||
use App\Models\ReferralLog;
|
||||
use App\Models\User;
|
||||
use App\Models\UserHourlyDataFlow;
|
||||
use Cache;
|
||||
use DB;
|
||||
use Response;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
public function index()
|
||||
public function index(): View
|
||||
{
|
||||
$past = strtotime('-'.sysConfig('expire_days').' days');
|
||||
$today = today();
|
||||
|
||||
$stats = Cache::remember('user_stats', now()->addMinutes(5), function () use ($today, $past) {
|
||||
$stats = cache()->remember('user_stats', now()->addMinutes(5), function () use ($today, $past) {
|
||||
$dailyTrafficUsage = NodeHourlyDataFlow::whereDate('created_at', $today)->sum(DB::raw('u + d'));
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user