1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-25 04:07:17 +08:00
2020-01-30 16:51:10 +08:00

30 lines
450 B
PHP

<?php
namespace App\Caches;
use App\Models\User as UserModel;
class MaxUserId extends Cache
{
protected $lifetime = 365 * 86400;
public function getLifetime()
{
return $this->lifetime;
}
public function getKey($id = null)
{
return 'max_user_id';
}
public function getContent($id = null)
{
$course = UserModel::findFirst(['order' => 'id DESC']);
return $course->id;
}
}