A package to convert a block of text into a word document (link).
-
The Medium Article was implemented in its entirety.
-
The Zip Archive constantly threw errors. So overcame that by adding the line:
\PhpOffice\PhpWord\Settings::setZipClass(\PhpOffice\PhpWord\Settings::PCLZIP);
in DocumentFormatter.php. -
The sample backend uses the route
/reports
for processing the text and not/report
(which was mentioned in the article). -
So the final command should be:
http://localhost:8000/reports?text=We_are_done!
which works just fine.