public function imprimirSalida($id) { $data = Salida_Material::find($id); $view = \View::make('n_transf', compact('data'))->render(); $pdf = \App::make('dompdf.wrapper'); $pdf->loadHTML($view); return $pdf->stream('n_salida ' . $data->codigo); }
public function indextables() { $datas = Salida_Material::Datatables()->get(); $data = $this->lisSalida($datas); return Datatables::of(collect($data))->editColumn('codigo', function ($data) { return '<a href="salida_material/' . $data['id'] . '" >' . $data['id'] . '</a>'; })->addColumn('action', function ($data) { return '<a href="salida_material/' . $data['id'] . '/edit" class="btn btn-xs btn-primary">Edit</a>' . ' / <form method="POST" action="http://localhost/inventario/salida_material/ ' . $data['id'] . '" accept-charset="UTF-8" style="display:inline"><input name="_method" type="hidden" value="DELETE"><input name="_token" type="hidden" value="' . csrf_token() . '"><button type="submit" class="btn btn-danger btn-xs">Borrar</button></form>'; })->make(true); }