12. 13. use MyHelper; 14. 15. class Tour extends Controller 16. { 17. 18. public function main($slug) 19. { 20. $tour= DB::where('slug', $slug)->get('tours')->row(); 21. $tourDetail= DB::where('tour_id', $tour->id)->get('tour_details')->row(); 22. $tourSchedules= DB::where('tour_id', $tour->id)->tour_schedules()->result(); 23. $tourGalleries= DB::where('tour_id', $tour->id)->tour_galleries()->result(); 24. $tourPrices= DB::where('tour_id', $tour->id)->where('is_published',1)->tour_prices()->result(); 25. View::tour($tour); 26. View::tourDetail($tourDetail); 27. View::tourSchedules($tourSchedules); 28. View::tourGalleries($tourGalleries); 29. View::tourPrices($tourPrices); 30. Masterpage::title($tour->meta_title); 31. }