-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListInboundWebhooks.php
More file actions
57 lines (51 loc) · 1.78 KB
/
Copy pathListInboundWebhooks.php
File metadata and controls
57 lines (51 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
declare(strict_types=1);
namespace Basement\Webhooks\Filament\Admin\Resources\InboundWebhook\Pages;
use Basement\Webhooks\Filament\Admin\Resources\InboundWebhook\InboundWebhookResource;
use Basement\Webhooks\Filament\Admin\Widgets\InboundWebhookStatsByProviderPercentage;
use Basement\Webhooks\Filament\Admin\Widgets\InboundWebhookStatsBySource;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\ForceDeleteBulkAction;
use Filament\Actions\RestoreBulkAction;
use Filament\Actions\ViewAction;
use Filament\Resources\Pages\ListRecords;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\TrashedFilter;
use Filament\Tables\Table;
final class ListInboundWebhooks extends ListRecords
{
protected static string $resource = InboundWebhookResource::class;
protected function getHeaderWidgets(): array
{
return [
InboundWebhookStatsBySource::make(),
];
}
public function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('source')
->badge(),
TextColumn::make('event'),
TextColumn::make('created_at')
->description(fn ($record) => $record->created_at->diffForHumans()),
])
->filters([
TrashedFilter::make(),
])
->recordActions([
ViewAction::make(),
DeleteAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
RestoreBulkAction::make(),
ForceDeleteBulkAction::make(),
]),
]);
}
}