feat(Mail template & Membership relationship)
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\NotificationTemplates;
|
||||
|
||||
use App\Filament\Resources\NotificationTemplates\Pages\CreateNotificationTemplate;
|
||||
use App\Filament\Resources\NotificationTemplates\Pages\EditNotificationTemplate;
|
||||
use App\Filament\Resources\NotificationTemplates\Pages\ListNotificationTemplates;
|
||||
use App\Filament\Resources\NotificationTemplates\Schemas\NotificationTemplateForm;
|
||||
use App\Filament\Resources\NotificationTemplates\Tables\NotificationTemplatesTable;
|
||||
use App\Models\NotificationTemplate;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class NotificationTemplateResource extends Resource
|
||||
{
|
||||
protected static ?string $model = NotificationTemplate::class;
|
||||
|
||||
protected static string|null|\UnitEnum $navigationGroup = 'Administration';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedEnvelope;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return NotificationTemplate::getAttributeLabel('singular_name');
|
||||
}
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return NotificationTemplate::getAttributeLabel('plural_name');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return NotificationTemplateForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return NotificationTemplatesTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListNotificationTemplates::route('/'),
|
||||
'create' => CreateNotificationTemplate::route('/create'),
|
||||
'edit' => EditNotificationTemplate::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user