コード例 #1
0
 public function bodega($nombre)
 {
     $bodega = Bodega::where('nombre', $nombre)->first();
     $view = \View::make('pdf.detalleBodega', compact('bodega'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     return $pdf->stream('detalleBodega');
 }
コード例 #2
0
 public function bodegas()
 {
     $bodegas = Bodega::paginate(5);
     return \View::make('paginas.bodegas', compact('bodegas'));
 }
コード例 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Bodega::destroy($id);
     Session::flash('message', 'Se eliminó la bodega correctamente');
     return Redirect::to('/bodega');
 }
コード例 #4
0
 public function crearRenta($id = 0)
 {
     $sid = $id;
     $bodegas = Bodega::where('estadoBodega', 0)->get();
     $bodegas = $bodegas->lists('nombre', 'id');
     return View::make('renta.crearRenta', compact(['bodegas', 'sid']));
 }