wrklst/docxmustache
wrklst/docxmustache generates Word .docx files from templates using Mustache-style placeholders. Fill variables and sections to create dynamic invoices, reports, contracts, and letters from PHP or Laravel without manual formatting. Simple, lightweight DOCX templating.
composer require <vendor>/<package> and note the version constraint — 0.0.44 is pre-1.0, so pin exactly ("0.0.44") or use ~0.0.44 rather than ^0.0 if you value stability.php artisan vendor:publish --tag=...) and read it end-to-end before writing any cleaning logic; the allowed-tag list, attribute whitelist, and encoding options are almost always the source of "the cleaner ate my markup" bug reports.posts.body from a WYSIWYG) on the way into the database. Start with one field, one entry point, and a fixture set of "dirty" HTML before wiring it into middleware or a global pipeline.onclick attribute, and an unclosed <b> — confirm both the output and that no exception is thrown on malformed input.prepareForValidation() — the cleanest default for user input. Clean the specific fields there, so controllers and models stay unaware of sanitisation and the rule set is testable in isolation.api/* tends to mangle JSON that legitimately contains angle brackets.{{ }} in Blade. Treat the cleaner as defence-in-depth, not a replacement for output escaping.<iframe> for a trusted embed host) as configuration or a small subclass rather than post-processing the cleaned string with str_replace.tests/fixtures/html/ directory of real-world dirty input. This is what makes the v0.0.44-style internal rewrite a five-minute verification instead of a regression hunt.> or quotes, and self-closing XHTML syntax. Re-run your fixture corpus against 0.0.43 and 0.0.44 and diff the output before bumping.0.0.x, patch-level bumps can change output. composer update on a Friday afternoon is how sanitisation regressions ship.e()/htmlspecialchars() then rendering with {!! !!} produces visible entities. Pick one layer to own escaping.php artisan config:cache means edits to the published config are invisible until re-cached; in local dev, check bootstrap/cache/config.php when changes "don't apply".artisan tinker until the output changes — the boundary is almost always an unclosed tag or an attribute with an unusual quote style.How can I help you explore Laravel packages today?