コード例 #1
0
 public function ListarePacheteHotel($slughotel)
 {
     $hotel = Hoteluri::findBySlug($slughotel);
     $pachete = Pachete::select('PackID', 'Name', 'slug', 'Description', 'Currency')->groupBy('PackID')->where('UnitID', $hotel->AidaID)->get();
     // $categorii = PrimaPaginaCateg::join('pachete', function($query) use($hotel){
     //                 $query->on('primapagina_categs.Cod', 'LIKE', DB::raw( "CONCAT('%|',pachete.Code,'|%')") );
     //             })
     //             ->where('pachete.UnitID', $hotel->AidaID)
     //             ->get();
     // dd($categorii);
     return view('frontend.listare-pachete-hotel')->with('hotel', $hotel)->with('pachete', $pachete);
 }
コード例 #2
0
 public function ListareDetaliiHotel($tara, $oras, $slughotel)
 {
     $hotel = Hoteluri::findBySlug($slughotel);
     $oras = Orase::findbyslug($oras);
     $hotel_id = Hoteluri::findOrFail($hotel->id);
     $weather = Weather::where('HotelID', $hotel->id)->get();
     $hoteluriSimilare = Hoteluri::where('AidaID', '<>', $hotel->AidaID)->where('City', $oras->AidaID)->take(3)->get();
     return view('frontend.detalii-hotel')->with('hotel', $hotel)->with('weather', $weather)->with('hoteluriSimilare', $hoteluriSimilare)->with('hotel_id', $hotel_id);
 }