22 lines
418 B
PHP
22 lines
418 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Librilladora extends Model {
|
|
use HasFactory;
|
|
|
|
public function prueba(string $nombre) {
|
|
$mpdf = new \Mpdf\Mpdf();
|
|
|
|
// Write some HTML code:
|
|
$mpdf->WriteHTML($nombre);
|
|
|
|
// Output a PDF file directly to the browser
|
|
$mpdf->Output();
|
|
|
|
}
|
|
}
|