librilladora/app/Models/Librilladora.php

22 lines
418 B
PHP
Raw Normal View History

2021-11-27 11:15:23 -03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Librilladora extends Model {
use HasFactory;
2021-11-27 11:23:12 -03:00
public function prueba(string $nombre) {
2021-11-27 11:15:23 -03:00
$mpdf = new \Mpdf\Mpdf();
// Write some HTML code:
2021-11-27 11:23:12 -03:00
$mpdf->WriteHTML($nombre);
2021-11-27 11:15:23 -03:00
// Output a PDF file directly to the browser
$mpdf->Output();
}
}