Add (ai tool submission)

This commit is contained in:
2023-11-29 21:16:13 +08:00
parent 79326f74f1
commit 7ce1e93242
67 changed files with 686 additions and 474 deletions

View File

@@ -10,9 +10,10 @@ class Cached
public static function tools_count()
{
$seconds_to_remember = 599;
// Retrieve the count from the cache or count and store it if not present
return Cache::remember('tools_count_' . $seconds_to_remember, $seconds_to_remember, function () {
return AiTool::where('status','live')->count();
return Cache::remember('tools_count_'.$seconds_to_remember, $seconds_to_remember, function () {
return AiTool::where('status', 'live')->count();
});
}
}
}