Update (fix): tool count display issue
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use App\Helpers\FirstParty\Cached\Cached;
|
||||
use App\Models\AiTool;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\View\View;
|
||||
@@ -10,14 +11,6 @@ class StatsComposer
|
||||
{
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$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::where('status','live')->count();
|
||||
});
|
||||
|
||||
$view->with('tools_count', $tools_count);
|
||||
|
||||
$view->with('tools_count', Cached::tools_count());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user