mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-30 00:54:45 +02:00

* Move these Move List/Create to their own pages to follow the flow of the other resources. * Move EditPage aswell * Move Save * Labels * Change Edit/Delete --------- Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com>
33 lines
882 B
PHP
33 lines
882 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources;
|
|
|
|
use App\Filament\Resources\WebhookResource\Pages;
|
|
use App\Models\WebhookConfiguration;
|
|
use Filament\Resources\Resource;
|
|
|
|
class WebhookResource extends Resource
|
|
{
|
|
protected static ?string $model = WebhookConfiguration::class;
|
|
|
|
protected static ?string $navigationIcon = 'tabler-webhook';
|
|
|
|
protected static ?string $navigationGroup = 'Advanced';
|
|
|
|
protected static ?string $label = 'Webhooks';
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return static::getModel()::count() ?: null;
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => Pages\ListWebhookConfigurations::route('/'),
|
|
'create' => Pages\CreateWebhookConfiguration::route('/create'),
|
|
'edit' => Pages\EditWebhookConfiguration::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|