Release
tbtop/admin 0.8.1: two-factor sign-in, a testing API and the admin on Node.js
Two-factor sign-in and email verification, a testing API for admin pages, the same admin on Node.js, and tables with an aside filter panel, filter chips, collapsible groups and line limits. Plus the last breaking changes before 1.0.
0.8.1 opens the 0.8 line. Sign-in grows email verification and two-factor codes, admin pages get a testing API, and the whole admin now also runs on Node.js. Tables pick up an aside filter panel, filter chips, collapsible groups and a line limit per column. It also carries the last breaking changes before 1.0: Laravel 11 support ends and HTML display blocks are sanitized.
Two-factor sign-in
admin:install --2fa publishes the auth pages plus a TOTP challenge page and a migration for Fortify's two-factor columns, so users who already enrolled through Fortify keep their factor.
composer require pragmarx/google2fa bacon/bacon-qr-code
php artisan admin:install --2fa- The profile page gains a two-factor section: turn it on with the current password, scan the QR code and confirm with the first code. Eight recovery codes are shown once.
- A user with a factor is parked after the password and signed in only after a TOTP or a recovery code. Codes are limited to five tries a minute, and a parked sign-in ends after ten minutes or when the password changes.
RequireTwoFactorin the auth stack sends any session that has not passed the challenge, such as one restored by a remember cookie, back to it. Delete the challenge page and it is all off.
Email verification
admin:install --auth now also publishes EmailVerificationPage. When the user model implements MustVerifyEmail, an unverified user is held on that page until they open the signed link it mails. The profile page and logout stay open, and a changed email gets a new link. From your own registration code, EmailVerificationPage::sendVerificationLink($user) sends one.
Testing your admin pages
tbtop(Page::class) in Pest, or $this->tbtop() in PHPUnit, drives a page through its real endpoints, so middleware, gates, authorize() and validation all run. Assertions read the JSON the page sends, not the PHP builders.
tbtop(PostsPage::class)
->table('posts')->search('draft')
->assertCanSeeRecords($drafts)
->callRowAction('publish', $drafts->first())
->assertNotified('Published');- Forms fill and submit from the prefilled record; modals open, fill and submit through their own action; table queries cover search, filters, sort, tabs and pages.
make:tbtop-resource --testswrites CRUD tests for the pages it generates, on the same API.- Node hosts get the same method names from
@tbtop/admin/testingastestAdmin().
The admin on Node.js
@tbtop/admin on npm is the same admin for a TypeScript server: the PHP DSL with the same method names, the same wire format and the same React client. It runs on Node, Bun and Cloudflare Workers as one Web fetch handler, reads data through Kysely or your own driver, and serves MCP too. It ships from the same tag as the PHP and React packages, so all three carry one version number.
Tables
filtersIn('aside')puts the filters in a panel beside the table that the user shows and hides;filtersCollapsed()sets the first-visit default.- Every applied filter shows as a chip under the toolbar, with a × to drop it and "Clear filters" to drop them all. No PHP change is needed.
groups('status', collapsible: true)turns group headers into toggles, andcollapsed: truestarts them closed.lineClamp(2)wraps a cell onto at most two lines with an ellipsis, next towrap(),truncate()andnoWrap().
Forms, stats and the panel
relation()->creatable([...])adds a "+ Create" link that saves the related record from a mini-form and selects it.inputMode('decimal')on text and number fields shows the right keyboard on a phone.- Presentation setters such as
label(),helperText(),default()anddisabled()take a closure resolved per request. Stat::params()puts filter fields in a stat card, like a chart's params, and re-runs the value on each change.brandLogo(),darkModeBrandLogo(),brandLogoHeight()andfavicon()brand the panel.- Over MCP,
searchreturns a short index and upload and media fields take files by URL.
Fixes
- Helper and error text are tied to every field control, and the search inputs have names, for screen readers.
- Destructive text stays readable in both themes, and page header actions stack and wrap on small screens.
- A dropdown group in
headerActions()opens its menu.
Upgrade
Upgrade tbtop/admin and @tbtop/inertia-admin together to 0.8.1; 0.8.0 was never published. Five changes can break a host: Laravel 11 is no longer supported, displayHtml() is sanitized (->trusted() opts out for markup you own), duplicate page slugs fail at boot on every panel, meta.disabled is always a boolean, and a bare MCP search returns an index. The steps are in Upgrade to 0.8. The new features are in the docs for authentication, testing and Node.js. Every change is in the changelog. Next on the roadmap is 0.9, with passkeys and the activity log.