Update (display): do not show non live tools

This commit is contained in:
2023-11-28 17:53:07 +08:00
parent 7d0a325c61
commit 2ac4988144
4 changed files with 5 additions and 4 deletions

View File

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