/** * Contact form * * @return Response */ public function index(CountryRepository $countryRepository) { $user = new User(); $countries = $countryRepository->getAllCountries(); $pageTitle = 'Contact'; return view('home.contact', compact('pageTitle', 'user', 'countries')); }
/** * Show the form for creating a new resource. * * @return Response */ public function create($tourId, TourRepository $tourRepository, ActivityRepository $activityRepository, CountryRepository $countryRepository) { $tour = $tourRepository->findTour($tourId); $activities = $activityRepository->getAllActivities(); $countries = $countryRepository->getDestinationCountries(); return view('tours.tourRelations', compact('tour', 'activities', 'countries')); }
public function edit($id, UserRepository $userReposiory, CountryRepository $countryRepository) { $user = $userReposiory->findUser($id); $countries = $countryRepository->getAllCountries(); $pageTitle = 'Edit a customer'; return view('users.edit', compact('pageTitle', 'user', 'countries')); }
/** * Display a listing of the resource. * * @return Response */ public function index(TourRepository $tourRepository, CountryRepository $countryRepository, ActivityRepository $activityRepository) { $tours = $tourRepository->getFeaturedTours(5); $countries = $countryRepository->getDestinationCountries(); $activities = $activityRepository->getAllActivities(); $pageTitle = "Sayang Holidays vacation tour packages are designed to take you to the loveliest places on Earth"; return view('home.index', compact('pageTitle', 'tours', 'countries', 'activities')); }
/** * Booking form * * @param int $tourId * @return Response */ public function create($tourId, Request $request, UserRepository $userRepository, TourRepository $tourRepository, CountryRepository $countryRepository) { $this->validate($request, ['email' => 'required|email|max:200']); $email = $request->input('email'); $user = $userRepository->findUserByEmail($email); $user = $user ? $user : new User(); $tour = $tourRepository->findTour($tourId); $countries = $countryRepository->getAllCountries(); $pageTitle = 'Book a Tour'; return view('bookings.create', compact('pageTitle', 'email', 'user', 'tour', 'countries')); }
/** * Display a listing of the resource. * * @return Response */ public function index(CountryRepository $countryRepository) { $countries = $countryRepository->getDestinationCountries(); $pageTitle = 'Destinations'; return view('destinations.index', compact('pageTitle', 'countries')); }
public function toursByCountry($countryId, CountryRepository $countryRepository, TourRepository $tourRepository) { $country = $countryRepository->findCountry($countryId); $tours = $tourRepository->getToursByCountry($countryId); $pageTitle = 'Tours - ' . $country->country_name; return view('tours.toursByCountry', compact('pageTitle', 'country', 'tours')); }