git add .

git commit "fix dashboard charts rendering and views data display"
This commit is contained in:
2026-08-22 09:38:46 +03:30
parent 947d2425d9
commit e72f68cd86
6 changed files with 118 additions and 51 deletions
+5
View File
@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Models\Tour;
use Illuminate\Support\Facades\Cache;
class TourController extends Controller
{
@@ -24,6 +25,10 @@ class TourController extends Controller
{
$tour->load('travelType');
$tour->increment('views');
$cacheKey = 'tour_views:' . $tour->id . ':' . now()->format('Y-m-d');
Cache::put($cacheKey, Cache::get($cacheKey, 0) + 1, now()->addDays(15));
$comments = $tour->comments()
->latest()
->get();