From e167cf5a3605da912f11ce028335f87a8a78597f Mon Sep 17 00:00:00 2001 From: John Wesely Date: Fri, 10 May 2024 08:25:46 -0600 Subject: [PATCH] update resource labels --- src/Filament/Resources/FilamentFormResource.php | 8 +++++++- .../FilamentFormResource/Pages/ListFilamentForms.php | 3 ++- src/Livewire/FilamentForm/Show.php | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Filament/Resources/FilamentFormResource.php b/src/Filament/Resources/FilamentFormResource.php index d61a8f2..0941a7f 100644 --- a/src/Filament/Resources/FilamentFormResource.php +++ b/src/Filament/Resources/FilamentFormResource.php @@ -20,6 +20,11 @@ class FilamentFormResource extends Resource protected static ?int $navigationSort = 99; + public static function getBreadcrumb(): string + { + return config('filament-form-builder.admin-panel-resource-name-plural'); + } + public static function getNavigationGroup(): ?string { return config('filament-form-builder.admin-panel-group-name'); @@ -77,7 +82,8 @@ public static function table(Table $table): Table Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), - ]); + ]) + ->emptyStateHeading('No '.config('filament-form-builder.admin-panel-resource-name-plural')); } public static function getRelations(): array diff --git a/src/Filament/Resources/FilamentFormResource/Pages/ListFilamentForms.php b/src/Filament/Resources/FilamentFormResource/Pages/ListFilamentForms.php index e293410..725e9a7 100644 --- a/src/Filament/Resources/FilamentFormResource/Pages/ListFilamentForms.php +++ b/src/Filament/Resources/FilamentFormResource/Pages/ListFilamentForms.php @@ -18,7 +18,8 @@ public function getTitle(): string protected function getHeaderActions(): array { return [ - Actions\CreateAction::make(), + Actions\CreateAction::make() + ->label('Create '.config('filament-form-builder.admin-panel-resource-name')), ]; } } diff --git a/src/Livewire/FilamentForm/Show.php b/src/Livewire/FilamentForm/Show.php index 3eb8ea4..159fd64 100644 --- a/src/Livewire/FilamentForm/Show.php +++ b/src/Livewire/FilamentForm/Show.php @@ -102,7 +102,8 @@ public function create() ], ); - return redirect(route(config('filament-form-builder.filament-form-user-show-route'), $entryModel)); + return redirect() + ->route(config('filament-form-builder.filament-form-user-show-route'), $entryModel); } public function parseValue(FilamentFormField $field, ?string $value): string