Note
Moving a Filament resource to Tabletop
One Filament v5 product resource moved to tbtop/admin 0.8: what the generator writes, what you change by hand, and where the port is not one to one.
If you run a Filament admin and want to see what Tabletop looks like on your own code, the honest test is one resource, not a feature table. This post takes a typical Filament v5 resource, a product catalogue with a status enum, a category, a price, an image, a rich-text description and soft deletes, and moves it to tbtop/admin 0.8. Most of it maps line for line. A few things do not, and those are the useful part.
What this is checked against. The Filament code follows the 5.x docs as of November 2026. The Tabletop code is what make:tbtop-resource writes in 0.8.3, with the hand edits this post describes. Your resource will differ, but the mapping holds.The resource we start from
The model stays exactly as it is. A products table with name, a unique slug and sku, category_id, a status string cast to an enum, a decimal(10,2) price, an is_featured boolean, a nullable published_at date, an image path, a description holding HTML, and deleted_at. The enum is the one from the Filament docs pattern:
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;
enum ProductStatus: string implements HasLabel, HasColor
{
case Draft = 'draft';
case Active = 'active';
case Archived = 'archived';
public function getLabel(): string
{
return ucfirst($this->value);
}
public function getColor(): string
{
return match ($this) {
self::Draft => 'gray',
self::Active => 'success',
self::Archived => 'warning',
};
}
}The table class, as make:filament-resource lays it out in Tables/ProductsTable.php:
public static function configure(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')->searchable()->sortable(),
TextColumn::make('category.name'),
TextColumn::make('status')->badge(),
TextColumn::make('price')->money('USD')->sortable(),
IconColumn::make('is_featured')->boolean(),
TextColumn::make('published_at')->date()->sortable(),
])
->filters([
SelectFilter::make('status')->options(ProductStatus::class),
SelectFilter::make('category')->relationship('category', 'name'),
TernaryFilter::make('is_featured'),
TrashedFilter::make(),
])
->recordActions([
EditAction::make(),
DeleteAction::make(),
RestoreAction::make(),
ForceDeleteAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
RestoreBulkAction::make(),
ForceDeleteBulkAction::make(),
]),
]);
}And the form, in Schemas/ProductForm.php:
public static function configure(Schema $schema): Schema
{
return $schema->components([
TextInput::make('name')->required()->maxLength(255),
TextInput::make('slug')->required()->unique(),
TextInput::make('sku')->required()->unique(),
Select::make('category_id')
->relationship(name: 'category', titleAttribute: 'name')
->searchable()
->preload()
->required(),
Select::make('status')->options(ProductStatus::class)->required(),
TextInput::make('price')->numeric()->prefix('$')->required(),
Toggle::make('is_featured'),
DatePicker::make('published_at'),
FileUpload::make('image')->image()->directory('products'),
RichEditor::make('description')->columnSpanFull(),
]);
}Step 1: generate the pages
Install the package next to Filament (composer require tbtop/admin, npm install @tbtop/inertia-admin, then php artisan admin:install). Both admins can live in one app while you move. Give the Tabletop panel a prefix Filament does not use, say ->prefix('backoffice'), and you can compare the two screens side by side. The install guide has the Vite entry and the rest of the wiring.
Then point the generator at the same model:
php artisan make:tbtop-resource Product --policy --testsIt reads the table, the casts and the foreign keys, and writes four files to app/Admin/Pages/Products/: IndexPage, CreatePage, EditPage and a ProductFormFields trait both forms share. The enum cast already became a select field and a badge() column, the foreign key a searchable relation field with category.name in the table, the unique indexes unique rules that skip the edited record on the edit page. Because the model uses SoftDeletes, the list has Active / Trashed / All tabs. The resource generator docs list every column-to-field rule.
There is no Resource class to register and nothing to keep in sync with it. The four files are ordinary pages, and from here on they are yours. The rest of this post is the hand edits.
Step 2: the enum
Tabletop reads HasLabel and HasColor from its own namespace, with the same method signatures as Filament's. Swapping the two use lines is the whole port:
use Tbtop\Admin\Contracts\HasColor;
use Tbtop\Admin\Contracts\HasLabel;While both admins run, the enum can implement both pairs at once. getLabel(): string and getColor(): string satisfy both sets of interfaces, so the same cases drive the Filament badge and the Tabletop one. Tabletop knows the color names gray, info, success, warning, danger and primary. A Filament palette array returned from getColor() throws, because only a color name goes over the wire.
Step 3: the table
Here is the list page after the edits. The generator's ID column and created-at column are gone, the columns and filters match the Filament table, and the edit, restore and force-delete actions the generator wrote are left out of the listing for space:
$s->table('products')
->query(fn () => Product::query()->with('category'))
->columns([
Column::make('name')->label('Name')->searchable()->sortable(),
Column::make('category.name')->label('Category'),
Column::make('status')->label('Status')->badge(ProductStatus::class),
Column::make('price')->label('Price')->number(2)->prefix('$')->sortable(),
Column::make('is_featured')->label('Featured')->boolean(),
Column::make('published_at')->label('Published')->date()->sortable(),
])
->filters([
Select::make('status')->label('Status')->options(ProductStatus::class),
Select::make('category_id')->label('Category')->searchable()->options(
Category::query()->orderBy('name')->get()
->map(fn (Category $category): array => [
'value' => (string) $category->getKey(),
'label' => $category->name,
])
->all(),
),
Radio::make('is_featured')->label('Featured')->inline()->ternary(),
])
->defaultSort('published_at', 'desc')
->paginate(25)
->recordUrl(fn (Product $record): string => EditPage::url(['product' => $record->getKey()]))
->rowActions([
DeleteAction::make($s, using: function (ActionCtx $ctx): void {
$record = Product::query()->whereKey($ctx->key())->firstOrFail();
Gate::authorize('delete', $record);
$record->delete();
}),
// restore and forceDelete: the same, loading through Product::withTrashed()
])
->bulkActions([
DeleteAction::make($s, name: 'delete-selected', bulk: true, using: function (ActionCtx $ctx): void {
$records = Product::query()->whereKey($ctx->selection)->get();
$records->each(fn (Product $record) => Gate::authorize('delete', $record));
$records->each->delete();
}),
// restoreSelected and forceDeleteSelected
])
->softDeletes($s, Product::class, ['rowActions' => false, 'bulkActions' => false]),Line by line, against the Filament table:
- Columns keep their names.
TextColumnandIconColumnare bothColumn::make(), and the kind is a method on it:badge(),boolean(),date(),number(). - `category.name` reads through the relation the same way. Unlike Filament, the table does not eager-load it on its own: the query needs
->with('category'), and the generator writes that line when the model declarescategory(). - The badge needs the enum class:
badge(ProductStatus::class). Filament finds the enum from the model cast; Tabletop takes it as an argument and keys the cases by->value. - Filters are form fields. A
Selectinfilters()filters withwhere(name, value), a multiple one withwhereIn. There is no relationship filter, so the category filter is a select oncategory_idwith its options listed. For a long list, give the select aquery()instead, and it searches on the server. - `TernaryFilter` is a radio. Since 0.8.3,
ternary()gives it the Any / Yes / No options: Any sends nothing,1and0match the boolean column. - `TrashedFilter` becomes tabs.
softDeletes()adds Active / Trashed / All above the table. With--policy, the generator turns off the macro's own restore and force-delete actions and writes its own, because those check no policy, and Filament's do. - `EditAction` is covered twice:
recordUrl()makes the whole row a link to the edit page, and the generator also writes aneditrow action that goes to the same place. The listing above keeps only the link. `DeleteAction` exists, and the delete itself is yours to write, in three lines. - `toolbarActions` with a `BulkActionGroup` is
bulkActions([...]). The actions show once a row is checked.
The price column is not money()
This one bites everybody. Tabletop's money('USD') takes the stored value in minor units, cents, and divides it by 100. In Filament terms it is ->money('USD', divideBy: 100). Our price is a decimal(10,2), so money() would show $19.99 as $0.20. For a decimal column, format it as a number with a prefix, as above. If your prices are already stored in cents, money() is the right call.
Step 4: the form
The generated trait holds the fields for both forms. After the edits:
protected function productFields(S $s, int|string|null $ignoreKey = null): array
{
return [
$s->text('name')->label('Name')->required()->rules(['max:255']),
$s->slug('slug')->fromField('name')->label('Slug')->required()
->rules(['max:255', $this->uniqueRule('slug', $ignoreKey)]),
$s->text('sku')->label('SKU')->required()
->rules(['max:255', $this->uniqueRule('sku', $ignoreKey)]),
$s->relation('category_id')->label('Category')->required()
->query(fn () => Category::query()->orderBy('name'))
->labelKey('name')
->searchable()
->rules(['exists:categories,id']),
$s->select('status')->label('Status')->required()
->options(ProductStatus::class)
->rules([Rule::enum(ProductStatus::class)]),
$s->number('price')->label('Price')->required()
->step(0.01)->prefix('$')
->rules(['numeric', 'min:0']),
$s->boolean('is_featured')->label('Featured'),
$s->date('published_at')->label('Published at')->rules(['nullable', 'date']),
$s->upload('image')->label('Image')
->accept('image/*')->disk('public')->directory('products'),
$s->richtext('description')->label('Description'),
];
}The differences worth knowing:
- Validation is Laravel rules on the field.
required()and friends exist as shortcuts, and anything else goes inrules(). The rules run on the server on every submit; the browser only uses them to show errors early. - Unique rules ignore the edited record through
$ignoreKey, which the edit page passes in. Filament does this for you inside a resource; here it is a visible argument, so you can see what it skips. - `Select::relationship()` is `relation()`. It searches on the server as the user types, so there is nothing to preload, and it returns at most 50 matches by default.
- The slug field fills from
namewhile the user types and stops once they leave the name field. Nolive()orafterStateUpdated()hook to wire. - The upload stores a path string, like
FileUploaddoes, so the existingimagecolumn works unchanged. Setdisk()to the disk Filament was writing to; Tabletop defaults topublic. The form only accepts a path the record already holds or one its own upload endpoint issued, so a hand-edited request cannot point the field at someone else's file.
Rich text changes format
This is the one step that reaches past the admin. Filament's RichEditor stores HTML by default. Tabletop's editor is Lexical, and it saves Lexical's JSON document, not HTML. It does open your existing HTML: a string that starts with a tag is imported into the editor. But the first save writes JSON to the column.
A small cast lets one column hold both while records convert one save at a time. Old rows come back as their HTML string, saved ones as the decoded document:
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use Illuminate\Database\Eloquent\Model;
final class RichTextOrHtml implements CastsAttributes
{
public function get(Model $model, string $key, mixed $value, array $attributes): array|string|null
{
$decoded = json_decode((string) $value, true);
return is_array($decoded) && isset($decoded['root']) ? $decoded : $value;
}
public function set(Model $model, string $key, mixed $value, array $attributes): ?string
{
if ($value === null) {
return null;
}
return is_array($value) ? json_encode($value, JSON_THROW_ON_ERROR) : (string) $value;
}
}
// Product::casts()
'description' => RichTextOrHtml::class,The admin is then done: the form reads and writes through the cast, and $s->displayRichtext() renders a converted document on a read-only page. Your storefront is not. Anything that prints {!! $product->description !!} needs to render the JSON once a product has been saved, and tbtop/admin 0.8 ships no PHP renderer for it. If that is more than you want to take on in the first pass, keep the description out of the move: leave it on a textarea holding HTML until you are ready.
Step 5: authorization
The policy class does not change. Filament calls viewAny, create, update, delete, restore and forceDelete on it for you. In Tabletop the same calls are written into the pages, and --policy writes all of them:
- The list page's
can()returns['viewAny', Product::class], and the create page checkscreate. A user without the ability gets a 403 and no menu item. - The edit page loads the record and calls
Gate::authorize('update', $record)before it renders and again before it saves. - Every action that touches a record loads it and calls
Gate::authorize()before the change: delete, restore, force delete. The bulk versions check every selected record before touching any of them. - One gap: a row action is not yet hidden per record by the policy. It shows on every row, and the check refuses it when it runs.
Being explicit costs a few lines per page. In exchange, a code review shows exactly which check guards which action.
Step 6: tests
A Filament app usually has Pest already. A fresh Laravel 13 app ships with PHPUnit only, so add Pest first: composer require pestphp/pest pestphp/pest-plugin-laravel --dev, then ./vendor/bin/pest --init, and turn on RefreshDatabase in tests/Pest.php.
--tests wrote Pest tests for listing, creating, editing and deleting, on the testing API from 0.8.1. It drives pages through their real endpoints, so the gate, the policy checks and the validation all run. If you had Filament table tests, the shape is close:
// Filament
livewire(ListProducts::class)
->filterTable('is_featured')
->assertCanSeeTableRecords($featured)
->assertCanNotSeeTableRecords($regular);
// Tabletop
tbtop(IndexPage::class)
->table('products')
->filter('is_featured', '1')
->assertCanSeeRecords($featured)
->assertCanNotSeeRecords($regular);Forms are tbtop(CreatePage::class)->fill([...])->submit()->assertHasNoErrors(), and actions are callRowAction() and callBulkAction(). The testing docs have the full list.
What does not map one to one
A product resource is the easy case. These are the Filament pieces that need more than a rename:
- Custom Livewire components and Blade views. Tabletop has no Livewire and no Blade in the admin. A custom field or block is a React component registered on the client with
defineFieldClient()orregisterBlock(), plus a small PHP class. It is a rewrite, not a port. - Relation managers. There is no separate class. An edit page can hold the record form and, below it, any number of tables scoped to the record's relations, each with its own actions. Same result, written inline.
- Infolists. A view page passes values to display blocks (
displayValue(),displayImage(),displayRichtext()) instead of binding entries by attribute name. The generator writes one with--view. - Global search, multi-tenancy and CSV import do not exist yet; they are on the roadmap for 2027. Export does:
ExportActionwrites CSV and XLSX since 0.8.2. - Plugins and render hooks. The Filament ecosystem has over a thousand plugins; Tabletop has a handful of packages. The shell (header, sidebar, footer) is a PHP
Chromeclass you can extend or replace, but a plugin you rely on has to be rebuilt.
If one of these is the heart of your admin, wait. If your resources look like this one, the move is mostly mechanical: generate, fix the money columns, decide about rich text, and compare the screens. Tabletop vs Filament has the architectural differences behind all this, and the demo lets you click through a finished panel before you install anything.