Skip to content

Commit 35ba3e8

Browse files
author
Chri$
committed
feat:[LAR-31] Change view action ,remove author filter and add channel filter
1 parent 4167ff5 commit 35ba3e8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/Filament/Resources/ThreadResource.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,16 @@ public static function table(Table $table): Table
5151
->label('Auteur'),
5252
])
5353
->filters([
54-
SelectFilter::make('Auteur')->relationship('user', 'name')->searchable()->preload(),
54+
SelectFilter::make('Channels')->relationship('channels', 'name')->searchable()->preload(),
5555
])
5656
->actions([
5757
ActionGroup::make([
58-
Action::make('view_thread')
58+
Action::make('view')
5959
->label('Voir le thread')
6060
->icon('heroicon-o-eye')
6161
->color('success')
62-
->action(function ($record): void {
63-
redirect()->route('forum.show', $record);
64-
}),
62+
->url(fn (Thread $record): string => route('forum.show', $record))
63+
->openUrlInNewTab(),
6564
Tables\Actions\DeleteAction::make(),
6665
]),
6766
])

0 commit comments

Comments
 (0)