Release
tbtop/admin 0.7.3: a profile page, live tables and sticky columns
A profile page for the signed-in user, tables that refresh themselves, pin columns, skip the count query and let users resize and reorder columns, and a badge that says which environment you are in.
0.7.3 gives the signed-in user a profile page and makes tables better at long, wide and changing data: rows that refresh on an interval, columns pinned on horizontal scroll, pages without a count query, and columns the user can resize and reorder. A badge in the header now says which environment you are editing.
A profile page
admin:install --auth now also publishes ProfilePage next to the sign-in pages, as an empty subclass you own. A host that signs users in through its own screens can publish it alone with --profile.
php artisan admin:install --profile- One form edits the name and email. A new email needs the current password, must be lowercase, and must be unique on the user model's table.
- The other form changes the password. It needs the current one, wrong attempts are throttled per user, and every other session is signed out.
- The page sits behind the panel's auth stack, and the user menu leads with Profile while the panel serves the subclass. Delete the file and both go.
Tables that refresh themselves
poll() re-fetches the current page of rows on an interval, with the user's search, filters, sort, tab and page, for lists that change under the user, such as an order queue or an import log.
$s->table('orders')->poll(10)- The refresh is silent: rows stay on screen with no loading overlay. The interval is at least 5 seconds.
- One failed tick keeps the rows; a second in a row shows the error state, so stale rows never pass for current ones. A tick that lands during a slow fetch is skipped instead of cancelling it.
- Polling pauses while the browser tab is hidden and while rows are selected, since new rows would clear a pending bulk selection.
Wide and long tables
Column::sticky()pins a column to the left edge of a table that scrolls sideways. Sticky columns leadcolumns(), and the selection checkbox and drag handle pin with them. A shadow marks the edge once content scrolls under them.simplePagination()skips thecount()query, which is the slow one on a large or heavily joined table. It reads one row past the page to know if there is a next one, and the footer shows previous, the page number, next and the per-page selector.- Users resize a column by dragging its header's right edge (double-click restores the declared width) and reorder columns in the Columns menu, by the grip or with Alt+↑/↓. Both are saved per table in the browser, sticky columns stay in front, and a reset entry clears them. No PHP change is needed.
$s->table('events')->paginate(50, [50, 100])->simplePagination()Which environment am I in?
environmentIndicator() on the panel shows app()->environment() as a colored badge in the header and a thin strip along the top edge, so nobody edits staging thinking it is production. It is hidden in production unless you list it, and takes per-environment colors and labels or a closure called per request.
return $panel->environmentIndicator(['staging' => 'danger']);Links only some users may open
A NavItem in navigationItems() or userMenuItems() used to be shown to everyone, so a link to a gated page led some users to a 403. can() now hides it from users the gate refuses, checked per request. It takes the same value a page's can() returns.
NavItem::make('Reports')->url('/admin/reports')->can(ReportsPage::can())Fixes you may have hit
- A group header sorts by its first
sortable()child, andtranslatable()children read their locale map. Both used to throw on a group child. - Sign-in, forgot-password and reset forms answer array input with a validation error instead of a 500.
- Sign-in fires Laravel's
Lockoutevent when the throttle trips, and the forgot and reset throttles say what was throttled instead of "Too many login attempts". - Numbered Lucide icons resolve by their lucide.dev name, so
->icon('share-2')and->icon('trash-2')draw an icon instead of nothing. The oldshare2keys keep working. - The count badge of a modal or handler action stays on its button instead of sitting off-screen and adding a horizontal scrollbar.
Upgrade
Upgrade tbtop/admin and @tbtop/inertia-admin together to 0.7.3. Nothing changes until you opt in: publish the profile page with admin:install --profile, and call poll(), sticky(), simplePagination() or environmentIndicator() where you want them. The details are in the docs for the profile page, auto-refresh, sticky columns and the environment indicator. Every change is in the changelog. Next on the roadmap is 0.8, with email verification and two-factor sign-in.