git commit "update flight page"
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Tour;
|
||||
|
||||
class TourController extends Controller
|
||||
{
|
||||
// صفحه لیست تورها: اسلایدر آخرینها + گرید صفحهبندیشده
|
||||
public function index()
|
||||
{
|
||||
$newestTour = Tour::latest()->take(10)->get();
|
||||
$tours = Tour::latest()->paginate(9);
|
||||
|
||||
return view('tours.index', compact('newestTour', 'tours'));
|
||||
}
|
||||
|
||||
// جزئیات تور + شمارنده بازدید
|
||||
public function show(Tour $tour)
|
||||
{
|
||||
$tour->increment('views');
|
||||
|
||||
return view('tours.show', compact('tour'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user