예제 #1
0
 function inicio(Request $request)
 {
     $datos = new stdClass();
     $opcionesMenu = Opciones::with('menu')->get();
     $promociones = Promociones::all(['nombre', 'imagen', 'inicio', 'slug']);
     $array = array_merge($opcionesMenu->toArray(), $promociones->toArray());
     shuffle($array);
     $datos->menus = Menus::with('opciones')->get();
     $datos->galeria = $array;
     $datos->filtros = Menus::all(['nombre']);
     $datos->servicios = Servicios::all(['nombre', 'descripcion', 'imagen', 'estado']);
     //        dd($datos -> menus );
     return view('Club.inicio')->with('datos', $datos);
 }
예제 #2
0
 public function promociones()
 {
     $promociones = Promociones::all();
     //dd($promociones);
     $view = \View::make('Center.reportes.promociones', compact('promociones'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     return $pdf->stream('promociones');
 }