feat:complete tour index
This commit is contained in:
@@ -2,9 +2,23 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Enums\FlightStatus;
|
||||
use App\Enums\TourStatus;
|
||||
use App\Models\Tour;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TourController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
$tours = Tour::query()
|
||||
->where('status', TourStatus::ENABLE)
|
||||
->with('file')
|
||||
->applySort()
|
||||
->paginate()
|
||||
->withQueryString();
|
||||
|
||||
return view('tours.index', compact('tours'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user