Можно ли создать таблицу с динамическими строками?
Я хотел бы знать, как можно вставить больше строк в таблицу, уже помещенную в шаблон.
FileWordController.php (Laravel)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class FileWordController extends Controller
{
public function crearWordDocx(){
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor(Storage_path('template.docx'));
$title = "Warehouse";
$templateProcessor->setValue('title_company',$title);
$templateProcessor->saveAs('Document02.docx');
header("Content-Disposition: attachment; filename=Document02.docx; charset=iso-8859-1");
echo file_get_contents("Document02.docx");
}
}