Grundgerüst Formulare und Seeder
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Contactgroups;
|
||||
|
||||
use App\Filament\Resources\Contactgroups\Pages\CreateContactgroup;
|
||||
use App\Filament\Resources\Contactgroups\Pages\EditContactgroup;
|
||||
use App\Filament\Resources\Contactgroups\Pages\ListContactgroups;
|
||||
use App\Filament\Resources\Contactgroups\Schemas\ContactgroupForm;
|
||||
use App\Filament\Resources\Contactgroups\Tables\ContactgroupsTable;
|
||||
use App\Models\Contactgroup;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class ContactgroupResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Contactgroup::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return ContactgroupForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return ContactgroupsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListContactgroups::route('/'),
|
||||
'create' => CreateContactgroup::route('/create'),
|
||||
'edit' => EditContactgroup::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user