Skip to content

Commit

Permalink
Merge pull request #235 from lara-zeus/add-form-id-column
Browse files Browse the repository at this point in the history
add form ID column in form table but hidden by default
  • Loading branch information
atmonshi authored Jan 11, 2024
2 parents 0f72846 + 940bd9b commit 4c47ab5
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 58 deletions.
116 changes: 58 additions & 58 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Filament/Resources/FormResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 2 additions & 0 deletions src/Models/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* @property bool $onePerUser
* @property mixed $sections
* @property mixed $fields
* @property int $user_id
* @property int $ordering
*/
class Form extends Model
{
Expand Down

0 comments on commit 4c47ab5

Please sign in to comment.