Skip to content

Commit 878d9dc

Browse files
committed
Remove lang switch from tag list page because of an incompatibility between spatie/laravel-tags and spatie/laravel-translatable
1 parent a7ab328 commit 878d9dc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ Best at the bottom of the file, since the pages routes with slugs will catch man
184184
\Statikbe\FilamentFlexibleContentBlockPages\Facades\FilamentFlexibleContentBlockPages::routes();
185185
```
186186

187+
**Note:** If you are using mcamara/laravel-localization for other routes, you need to put the above line OUTSIDE of
188+
the laravel-localization middleware group. The middleware is already included in `FilamentFlexibleContentBlockPages::routes()`.
189+
187190
### Filament panel
188191

189192
The package contains a pre-configured panel. You can register the panel in the `bootstrap\providers.php` configuration file.

resources/lang/fr/filament-flexible-content-block-pages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'general' => 'Général',
1111
'content' => 'Contenu',
1212
'seo' => 'SEO',
13-
'overview' => 'Vue d'ensemble',
13+
'overview' => 'Vue d\'ensemble',
1414
'advanced' => 'Avancé',
1515
],
1616
'table' => [

src/Resources/TagResource/Pages/ListTags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Filament\Resources\Pages\ListRecords\Concerns\Translatable;
88
use Statikbe\FilamentFlexibleContentBlockPages\Facades\FilamentFlexibleContentBlockPages;
99
use Statikbe\FilamentFlexibleContentBlockPages\FilamentFlexibleContentBlockPagesConfig;
10-
use Statikbe\FilamentFlexibleContentBlocks\Filament\Actions\FlexibleLocaleSwitcher;
1110

1211
class ListTags extends ListRecords
1312
{
@@ -21,7 +20,8 @@ public static function getResource(): string
2120
protected function getActions(): array
2221
{
2322
return [
24-
FlexibleLocaleSwitcher::make(),
23+
// we cannot include a language switch because of an incompatibility between spatie/laravel-tags and
24+
// spatie/laravel-translatable. See: https://github.com/spatie/laravel-tags/issues/508
2525
CreateAction::make(),
2626
];
2727
}

0 commit comments

Comments
 (0)