Skip to content

Commit

Permalink
make api tokens columns sortable
Browse files Browse the repository at this point in the history
  • Loading branch information
danilopolani committed Mar 5, 2024
1 parent 2124eef commit 68f90b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Resources/ApiTokenResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ public static function table(Tables\Table $table): Tables\Table
return $table
->columns([
Tables\Columns\TextColumn::make('name')
->searchable()
->placeholder('No name provided'),

Tables\Columns\TextColumn::make('expires_at')
->label('Expiration date (UTC)')
->dateTime()
->placeholder('Never expires'),
->placeholder('Never expires')
->sortable(),

Tables\Columns\TextColumn::make('last_used_at')
->dateTime()
->placeholder('Never used'),
->placeholder('Never used')
->sortable(),
])
->actions([
Tables\Actions\DeleteAction::make(),
Expand Down

0 comments on commit 68f90b0

Please sign in to comment.