feat: add view count feature for tours and flights

This commit is contained in:
2026-08-19 13:51:44 +03:30
parent eebededa4d
commit 33de5fe54f
6 changed files with 12 additions and 7 deletions
+4 -2
View File
@@ -53,7 +53,8 @@ class Flight extends Model
'price' => 'int',
'capacity' => 'int',
'status' => FlightStatus::class,
'trip_type' => FlightTripType::class
'trip_type' => FlightTripType::class,
'views_count' => 'int'
];
protected $fillable = [
@@ -66,7 +67,8 @@ class Flight extends Model
'price',
'capacity',
'status',
'trip_type'
'trip_type',
'views_count'
];
#[Scope]
protected function applySort(Builder $query, ?string $sort = null): void