twig/inky-extra
Twig extension adding an inky_to_html filter to convert ZURB Inky email templates into responsive HTML. Useful for generating email markup from simple Inky components directly within Twig templates.
spatie/laravel-twig or native Twig), enabling component-driven email development while leveraging Laravel’s existing templating ecosystem. Ideal for projects using Twig for server-side rendering, particularly for transactional emails or marketing campaigns with reusable components.spatie/laravel-twig) or manual setup in Symfony. Requires:
composer require twig/inky-extra
// Symfony/Laravel (manual registration)
$twig->addExtension(new \Twig\Extra\Inky\InkyExtension());
{{ }} vs. {!! !!}) and Laravel-specific Blade directives (e.g., @stack). No automated migration path; requires rewriting all email templates to Twig/Inky.<container>, <row>), requiring training or documentation.inky_to_html:
{% set name = "John" %}
{{ include('emails/welcome.inky', {'name': name}) | inky_to_html }}
mso-* hacks). Mitigation:
{{ }} syntax clashes with Twig’s. Raw Inky strings require pre-resolved variables in PHP (e.g., str_replace or custom filters).Mailable + queues) to handle spikes.spatie/laravel-twig (automatic registration) or manual setup in AppServiceProvider. Leverages Laravel’s existing Twig support for Mailable classes, queues, and view rendering.inky_to_html filter. Laravel 10 users may need to upgrade Twig via composer require twig/twig:^3.13.<container>, <row>). Provide cheat sheets or VS Code snippets for adoption.inky_to_html. Avoid direct interpolation:
{# ❌ Avoid this (variable scope conflict) #}
<h1>{{ user.name }}</h1>
{# ✅ Do this (pre-resolve variables) #}
{% set userName = user.name %}
<h1>{{ userName }}</h1>
<container>
{# Legacy HTML block for Outlook #}
<![if mso]>
<table ...>
<![endif]-->
<row>
<columns large="6">
<h1>Welcome, {{ name }}!</h1>
</columns>
</row>
</container>
twig/inky-extra and register the extension.cache: true in config/twig.php).How can I help you explore Laravel packages today?