Skip to content

Commit

Permalink
Add ability to sort on artist and is_on_view
Browse files Browse the repository at this point in the history
  • Loading branch information
driftingly committed May 7, 2024
1 parent 9c4e232 commit 9121d4f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Http/Controllers/Twill/ArtworkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,13 @@ protected function additionalIndexTableColumns(): TableColumns
{
return parent::additionalIndexTableColumns()
->add(Text::make()
->field('artist'))
->field('artist')
->sortable()
)
->add(Boolean::make()
->field('is_on_view'))
->field('is_on_view')
->sortable()
)
->add(Text::make()
->field('Themes')
->customRender(fn ($artwork) => $artwork->themePrompts()->with('theme')->get()->pluck('theme')
Expand Down

0 comments on commit 9121d4f

Please sign in to comment.