diff --git a/app/Http/Controllers/LibrilladoraController.php b/app/Http/Controllers/LibrilladoraController.php index 0db22e5..d5650b9 100644 --- a/app/Http/Controllers/LibrilladoraController.php +++ b/app/Http/Controllers/LibrilladoraController.php @@ -9,7 +9,8 @@ class LibrilladoraController extends Controller { // public function process(Request $request) { + $nombre = $request->input("Archivo"); $lib = new Librilladora(); - $lib->prueba(); + $lib->prueba($nombre); } } diff --git a/app/Models/Librilladora.php b/app/Models/Librilladora.php index f1fc0e6..6baf4be 100644 --- a/app/Models/Librilladora.php +++ b/app/Models/Librilladora.php @@ -8,11 +8,11 @@ use Illuminate\Database\Eloquent\Model; class Librilladora extends Model { use HasFactory; - public function prueba() { + public function prueba(string $nombre) { $mpdf = new \Mpdf\Mpdf(); // Write some HTML code: - $mpdf->WriteHTML('Hello World'); + $mpdf->WriteHTML($nombre); // Output a PDF file directly to the browser $mpdf->Output();