From 7c7764e3c26c76805c4c6014b22d22d3f2cdea85 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Thu, 11 Jan 2024 21:43:57 +0300 Subject: [PATCH] add form ID column in form table but hidden by default --- src/Filament/Resources/FormResource.php | 1 + src/Models/Form.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/Filament/Resources/FormResource.php b/src/Filament/Resources/FormResource.php index 003974c7..a968e894 100644 --- a/src/Filament/Resources/FormResource.php +++ b/src/Filament/Resources/FormResource.php @@ -131,6 +131,7 @@ public static function table(Table $table): Table return $table ->reorderable('ordering') ->columns([ + TextColumn::make('id')->sortable()->label(__('Form ID'))->toggleable(isToggledHiddenByDefault: true), TextColumn::make('name')->searchable()->sortable()->label(__('Form Name'))->toggleable(), TextColumn::make('category.name')->searchable()->label(__('Category'))->sortable()->toggleable(), IconColumn::make('is_active')->boolean()->label(__('Is Active'))->sortable()->toggleable(), diff --git a/src/Models/Form.php b/src/Models/Form.php index 9e38fa5a..ffe288c1 100644 --- a/src/Models/Form.php +++ b/src/Models/Form.php @@ -30,6 +30,8 @@ * @property bool $onePerUser * @property mixed $sections * @property mixed $fields + * @property int $user_id + * @property int $ordering */ class Form extends Model {