/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { aereo::destroy($id); Session::flash('flash_message', 'aereo successfully deleted!'); return redirect('aereo'); }
public function listarafaturaraereo(Request $request) { $regselect = $request->admin; foreach ($regselect as $key) { $registro = aereo::findOrFail($key); $agente = $registro->agente; $registros[] = aereo::findOrFail($key); } //return view('faturamento.listarafaturaraereo', compact('registros')); $data = date("d/m/Y"); $pdf = PDF::loadView('faturamento.listarafaturaraereo', compact('registros')); return $pdf->download('Faturar-' . $data . $agente . '-AR' . '.pdf'); }