Se pasa info al mpdf
This commit is contained in:
parent
68f8939215
commit
e0c33f23e2
|
@ -9,7 +9,8 @@ class LibrilladoraController extends Controller
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
public function process(Request $request) {
|
public function process(Request $request) {
|
||||||
|
$nombre = $request->input("Archivo");
|
||||||
$lib = new Librilladora();
|
$lib = new Librilladora();
|
||||||
$lib->prueba();
|
$lib->prueba($nombre);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,11 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class Librilladora extends Model {
|
class Librilladora extends Model {
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
public function prueba() {
|
public function prueba(string $nombre) {
|
||||||
$mpdf = new \Mpdf\Mpdf();
|
$mpdf = new \Mpdf\Mpdf();
|
||||||
|
|
||||||
// Write some HTML code:
|
// Write some HTML code:
|
||||||
$mpdf->WriteHTML('Hello World');
|
$mpdf->WriteHTML($nombre);
|
||||||
|
|
||||||
// Output a PDF file directly to the browser
|
// Output a PDF file directly to the browser
|
||||||
$mpdf->Output();
|
$mpdf->Output();
|
||||||
|
|
Loading…
Reference in New Issue