Add comments to home page

This commit is contained in:
2026-01-10 19:11:28 +01:00
parent 13b70fdf23
commit db6da608aa
3 changed files with 46 additions and 12 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Helpers;
use App\Models\Comment;
use App\Models\Episode;
use App\Models\Hentai;
use App\Models\PopularMonthly;
@@ -126,7 +127,7 @@ class CacheHelper
public static function getLatestComments()
{
return Cache::remember("latest_comments", now()->addMinutes(60), function () {
return DB::table('comments')->latest()->take(10)->get();
return Comment::latest()->take(10)->get();
});
}
}