feat: add view count feature for tours and flights
This commit is contained in:
@@ -32,6 +32,7 @@ class FlightController extends Controller
|
||||
public function show(Flight $flight)
|
||||
{
|
||||
$title = 'جزئیات پرواز';
|
||||
$flight->increment('views_count');
|
||||
return view('flights.show' , compact('title' , 'flight'));
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ class TourController extends Controller
|
||||
},
|
||||
'comments.user'
|
||||
]);
|
||||
$tour->increment('views_count');
|
||||
|
||||
return view('tours.show', compact('title' , 'tour'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user