コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $tours = Tour::latest('created_at')->published()->get();
     return view('vietnam.index', compact('tours'));
 }
コード例 #2
0
 /**
  * Get all tours
  * 
  * @return collection
  */
 public function getAllTours($perPage = 100)
 {
     return Tour::latest('id')->paginate($perPage);
 }
コード例 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $tours = Tour::latest('created_at')->get();
     $destinations = TourDestination::orderBy('name')->get();
     return view('admin.tours.index', ['tours' => $tours, 'destinations' => $destinations]);
 }