<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <link rel="stylesheet" href="{{asset('css/bootstrap-email.css')}}"> <!-- Latest compiled and minified CSS & JS --> <style type="text/css" media="screen"> body { font-family: 'Helvetica Neue'; font-size: 14px; font-weight: 12px; } </style> </head> <body> <?php $contenido = renderVariables($contenido); ?> {{ str_replace("<p> </p>","<br>",$contenido) }} <br> </body> </html>
public function generarRecibo($id) { $solvencia = Solvencia::find($id); if (Auth::user()->residencia_id != $solvencia->residencia_id) { return Response::make("No posee los permisos para ver este recibo", 403); } $año = $solvencia->año; $mes = $solvencia->mes; $user = Auth::user(); $residencia = $solvencia->residencia; $html = View::make('pdf.comprobante')->with('año', $año)->withMes($mes)->withResidencia($residencia)->withPersona($user)->withSolvencia($solvencia); $html = renderVariables($html); header('Content-Type : application/pdf'); $headers = array('Content-Type' => 'application/pdf'); return Response::make(PDF::load($html, 'A4', 'portrait')->show('Solvencia-' . $mes . "-" . $año), 200, $headers); }