Plugins
Add types, blocks and screens from a package
A plugin brings content types, blocks, field types, admin screens, listeners and AI providers. It loads only when your config names it, so installing one switches nothing on.
No plugins are published yet. The cards below are examples of what a plugin can add, under a placeholder vendor name.
SEO
acme/seoRedirects and site-wide SEO settings on a screen of its own, and a cache purge whenever something is published.
Forms
acme/formsA form block editors place on any page, and a screen in the admin to read what visitors sent.
Search index
acme/search-indexKeeps an external search index in step by listening to Saved, Published, Deleted and Restored.
CDN purge
acme/cdn-purgeClears cached pages at a CDN when an entry is published, from a queued listener, so a failure never fails the save.
Map field
acme/map-fieldA field type for a point on a map, drawn in the form by a view of its own.
Video embeds
acme/embedsA block for embedding video, its poster picked from the media library.
Audit log
acme/audit-logRecords what changed and when, on a screen behind a capability of its own in the roles grid.
Together AI
acme/togetherAdds Together AI to the Connectors screen, through laravel/ai's OpenAI-compatible driver.
No plugin matches that.
Build a plugin
Extend Mainstay\Plugin, give it a handle, and return the types, views, routes, listeners and AI providers the package brings.
The handle reserves your names
Views under seo::, screens under /admin/seo, and the capability use_seo, which the roles grid lists under Plugins.
Named in config to load
Add the class to plugins in config/mainstay.php. A handle another plugin or the admin already has is refused as Mainstay boots.
#[Icon('star')]
class Seo extends Plugin
{
public static function handle(): string
{
return 'seo';
}
public function views(): ?string
{
return __DIR__.'/../resources/views';
}
public function routes(): ?string
{
return __DIR__.'/../routes/admin.php';
}
}