Wingman is a Craft 6 plugin. Craft 6 is still in beta, and so is Wingman (6.0.0-beta.1) — try it on staging first and use caution on production sites.
Craft 6 · Beta — use caution on production
Your Laravel models, at home in Craft
Craft 6 can turn an Eloquent model into an element, if you write the classes and the registration for each one. Wingman does it from the control panel: pick a model, give it a handle, and your customers, orders or bookings get an index, an editor, permissions and a relation field your entries can use.
Same model, every template engine
Each model gets a template query in Twig and Blade. Pro adds the other direction: from a model row to the entries that point at it, without N+1 queries.
{# Twig #}
{% for customer in craft.customers().orderBy('name').all() %}
{{ customer }} — {{ customer.company }}
{# Pro: entries relating to this customer #}
{{ wingman.relatedEntries(customer, 'customers').count() }} case studies
{% endfor %}
{{-- Blade --}}
@foreach ($craft->customers()->all() as $customer) {{ $customer }} @endforeach
// PHP (Pro), on the model itself
$customer->craftEntries('customers')->all();
Customer::loadCraftEntries($customers, 'customers'); // no N+1
Features
Everything around core's Eloquent elements that you'd otherwise write by hand.
Registered from the control panel
Pick a model from your app, give it a handle and a label, choose its label column, what trashing does to the row, and whether it's in the sidebar. No element classes, no field classes, no service provider code.
Guarded so it can't take your site down
Handles that would collide with Craft's own element types or CP pages, Craft's own models, unknown classes and hidden label columns are refused with a message. A model that breaks later is skipped and logged.
Health, backfill and orphans
See rows, rows with elements, missing elements and orphans per model. Backfill creates missing elements without touching your rows, and queues itself for big tables. Delete orphans cleans up after rows deleted outside Eloquent.
Twig and Blade
craft.customers() in both engines, elements that print their label, and wingman.element(model) to get from a model row to its element.
Pro: reverse lookups and conditions
A trait gives your models craftEntries() and eager loading for lists. Element indexes and relation fields get a condition rule per model attribute.
Pro: GraphQL, $hidden respected
Typed queries per model and typed relation fields, each model behind its own schema permission. Attributes your model hides are never fields, filters or sort keys.
Frequently Asked Questions
The questions worth answering before you install it.
No. It is a native Craft 6 plugin built on Craft 6's own Eloquent elements. Craft 6 is still in beta.
Use caution. Craft 6 and Wingman (6.0.0-beta.1) are both in beta, so expect changes between releases. Test on staging, keep backups, and move to production only once you're comfortable with the beta.
Core needs an element class, a field class and a registration call in PHP for every model. Wingman registers models from the control panel, refuses the collisions that would break every request, and adds health, backfill and orphan cleanup. Pro adds reverse lookups, attribute conditions and GraphQL.
No. Craft links elements to rows in its own table. Your rows change only when someone edits an element in the control panel, or trashes one if you chose soft deletes.
No, and on purpose: a row has one value per column, so its element is the same on every site, as in Craft 6 core. Model labels and Wingman's control panel strings are translatable.
Lite is free: registration, the control panel, relation fields, templates, health, backfill and orphan cleanup. Pro adds reverse lookups, attribute conditions and GraphQL; its price will be announced before release.
Craft CMS 6.0.0-beta.1 or later and PHP 8.5.
Try it on staging today
Lite is free. Wingman is a Craft 6 beta plugin on a beta CMS — start on a development or staging site and use caution on production.