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'); }
public function bodegas() { $bodegas = Bodega::paginate(5); return \View::make('paginas.bodegas', compact('bodegas')); }
/** * 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'); }
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'])); }