admin widget zu dokploy geswitched
This commit is contained in:
@@ -112,14 +112,16 @@ class PostResource extends Resource
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columns(2),
|
||||
]),
|
||||
TextInput::make('slug')
|
||||
->label('Slug')
|
||||
->required()
|
||||
->unique(BlogPost::class, 'slug', ignoreRecord: true)
|
||||
->maxLength(255),
|
||||
])
|
||||
->columnSpanFull(),
|
||||
Section::make('Bild und Kategorie')
|
||||
->schema([
|
||||
TextInput::make('slug')
|
||||
->label('Slug')
|
||||
->required()
|
||||
->unique(BlogPost::class, 'slug', ignoreRecord: true)
|
||||
->maxLength(255)
|
||||
->columnSpanFull(),
|
||||
FileUpload::make('featured_image')
|
||||
->label('Featured Image')
|
||||
->image()
|
||||
@@ -194,6 +196,8 @@ class PostResource extends Resource
|
||||
->label('Titel (DE)')
|
||||
->getStateUsing(fn ($record) => $record->getTranslation('title', 'de'))
|
||||
->searchable()
|
||||
->limit(50)
|
||||
->url(fn ($record) => static::getUrl('edit', ['record' => $record]))
|
||||
->sortable(),
|
||||
TextColumn::make('category_label')
|
||||
->label('Kategorie')
|
||||
@@ -225,10 +229,10 @@ class PostResource extends Resource
|
||||
->trueIcon('heroicon-o-check-circle')
|
||||
->falseIcon('heroicon-o-x-circle'),
|
||||
TextColumn::make('published_at')
|
||||
->label('Veröffentlicht am')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
->label('Veröffentlichungsdatum')
|
||||
->icon('heroicon-o-calendar')
|
||||
->dateTime('d.m.Y H:i')
|
||||
->sortable(),
|
||||
TextColumn::make('created_at')
|
||||
->label('Erstellt am')
|
||||
->dateTime()
|
||||
@@ -240,9 +244,9 @@ class PostResource extends Resource
|
||||
->label('Veröffentlicht'),
|
||||
])
|
||||
->actions([
|
||||
ViewAction::make(),
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
DeleteAction::make()
|
||||
->icon('heroicon-o-trash')
|
||||
->label(''),
|
||||
])
|
||||
->bulkActions([
|
||||
BulkActionGroup::make([
|
||||
|
||||
Reference in New Issue
Block a user