bengor-user/twig-bridge
TwigBridge is an adapter that makes BenGorUser “User” objects compatible with Twig templates. Install via Composer and use it to expose user data cleanly in Twig-based views. Requires PHP 5.5+.
User objects (e.g., from BenGorUser) into Twig templates, reducing boilerplate for rendering user data (e.g., {{ user.fullName }} instead of {{ user.getFullName() }}).User model.User objects in templates.User model extends a third-party library (e.g., BenGorUser) and lacks native Twig support.User, Role).User model is simple (e.g., only uses id, name, email) and doesn’t need Twig magic methods.For Executives:
"This lightweight package (MIT-licensed, 1-line install) bridges Laravel’s User model with Twig templates, cutting dev time for profile/dashboard UIs. It’s a drop-in solution for teams already using Twig—no custom adapters needed. Low risk (minimal dependencies), high ROI for templating-heavy apps."
For Engineering:
"If we’re using Twig and need to render User objects (e.g., {{ user.address }} instead of {{ user->address }}), this package provides a zero-boilerplate adapter for BenGorUser’s User class. Tradeoff: Last updated in 2017, but the core functionality is stable. Alternative: Fork and modernize if PHP 8.x support is critical."
How can I help you explore Laravel packages today?