public static function getPurchase() { $vacations = Vacation::getVacations(Auth::user()->id); $destination = Vacation::getAll(); // $remaining = Vacation::remainingBalance($id); return view("account", ["vacations" => $vacations, "destination" => $destination]); }
public function view($id) { $destination = Vacation::get($id); $images = DestinationImage::getImagesForDestination($id); $allImages = DestinationImage::getAllImages(); $random = Vacation::randomVacation($id); array_slice($random, 0, 1); return view("vacation_detail", ["destination" => $destination, "images" => $images, "allImages" => $allImages, "random" => $random]); }