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,6 +5,7 @@ namespace App\Http\Controllers;
use App\Models\Flight;
use App\Models\Tour;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
class FlightController extends Controller
{
@@ -40,6 +41,9 @@ class FlightController extends Controller
{
$flight->increment('views');
$cacheKey = 'flight_views:' . $flight->id . ':' . now()->format('Y-m-d');
Cache::put($cacheKey, Cache::get($cacheKey, 0) + 1, now()->addDays(15));
$comments = $flight->comments()
->latest()
->get();