Laravel Superadmin
One un-deletable, un-lockout-able super-admin account — enforced at the Eloquent layer and, optionally, hardened across every Filament panel.
Exactly one super-admin is created on first migrate with a host-derived email — never a vendor domain, never written to .env.
An observer blocks deleting, email-changing, un-protecting, or mass-assignment privilege escalation of the protected user — at the model layer, in any context.
The protected user passes every authorization check without Spatie or Shield — works the moment the package is installed.
A wildcard eloquent.created listener assigns the Shield super-admin role even when the role row is seeded after the user — no migration-order race.
The optional panel plugin hides DeleteAction / ForceDeleteAction and locks configured fields on the protected row across every resource.
superadmin:ensure creates or repairs the account idempotently; superadmin:status --verbose audits the protection invariants in CI.
Why it exists
Every panel eventually hits the "someone deleted the only admin" or "the owner got locked out of their own app" incident. This package makes that structurally impossible — without you remembering to guard each action by hand.
Installation
Own the account (recommended)
The auto-created account uses a host-derived email and a default password. Claim it in a seeder so it is yours from day one.
CLI — create & audit
Optional — Filament panel hardening
The core protection is panel-agnostic. Add the plugin to also hide destructive actions and lock privileged fields on the protected row inside Filament.