Cluster sub-navigation not showing

Hi everyone! I added a new cluster with some resources inside, but I'm not seeing the side navigation appear. I'm pretty sure I must be missing something. Does anyone know what I might be doing wrong? This is the Cluster:
<?php

namespace App\Filament\Clusters;

use Filament\Clusters\Cluster;

class MiniTournaments extends Cluster
{
protected static ?string $navigationIcon = 'heroicon-o-squares-2x2';
protected static ?string $clusterBreadcrumb = 'Mini Torneos';
protected static ?string $navigationLabel = 'Mini Torneos';

protected static ?int $navigationSort = 0;

protected static ?string $slug = 'mini-tournaments';
}
<?php

namespace App\Filament\Clusters;

use Filament\Clusters\Cluster;

class MiniTournaments extends Cluster
{
protected static ?string $navigationIcon = 'heroicon-o-squares-2x2';
protected static ?string $clusterBreadcrumb = 'Mini Torneos';
protected static ?string $navigationLabel = 'Mini Torneos';

protected static ?int $navigationSort = 0;

protected static ?string $slug = 'mini-tournaments';
}
This is a Resource within the Cluster:
namespace App\Filament\Clusters\MiniTournaments\Resources;

use App\Filament\Clusters\MiniTournaments;
use App\Filament\Clusters\MiniTournaments\Resources\MiniTournamentPlayersResource\Pages;
use App\Models\MiniTournamentPlayer;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;

class MiniTournamentPlayersResource extends Resource
{
protected static ?string $model = MiniTournamentPlayer::class;

protected static ?string $navigationIcon = 'heroicon-o-user-group';

protected static ?string $cluster = MiniTournaments::class;

protected static ?string $navigationLabel = 'Jugadores';

protected static ?int $navigationSort = 2;

...
namespace App\Filament\Clusters\MiniTournaments\Resources;

use App\Filament\Clusters\MiniTournaments;
use App\Filament\Clusters\MiniTournaments\Resources\MiniTournamentPlayersResource\Pages;
use App\Models\MiniTournamentPlayer;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;

class MiniTournamentPlayersResource extends Resource
{
protected static ?string $model = MiniTournamentPlayer::class;

protected static ?string $navigationIcon = 'heroicon-o-user-group';

protected static ?string $cluster = MiniTournaments::class;

protected static ?string $navigationLabel = 'Jugadores';

protected static ?int $navigationSort = 2;

...
Appreciate your help!
No description
7 Replies
Matthew
Matthewβ€’3w ago
Have you put your discoverClusters() into your panel provider ?
LiruLiruLiru
LiruLiruLiruOPβ€’3w ago
yes! I have this: ->discoverClusters(in: app_path('Filament/Clusters'), for: 'App\Filament\Clusters')
Matthew
Matthewβ€’3w ago
Try: ->discoverClusters(in: app_path('Filament/Clusters'), for: 'App\Filament\Clusters')
LiruLiruLiru
LiruLiruLiruOPβ€’3w ago
yeah that is exactly what I have πŸ€”. You meant the double backslash? I do have it like that but looks like Discord removes it on paste. Actually if I remove that line I dont get the main item on the navigation, and if I added i get the main item but not the sub-navigation so I guess that part might be working
Matthew
Matthewβ€’2w ago
What are you expecting by sub-navigation ? (yep meant double backslash, maybe code block will show it: ->discoverClusters(in: app_path('Filament/Clusters'), for: 'App\\Filament\\Clusters')
LiruLiruLiru
LiruLiruLiruOPβ€’2w ago
Sorry just saw this reply! but by sub-navigation I meant what's described in the Clusters section of the docs
When using a cluster, a few things happen: A new navigation item is added to the navigation, which is a link to the first resource or page in the cluster. The individual navigation items for the resources or pages are no longer visible in the main navigation. A new sub-navigation UI is added to each resource or page in the cluster, which contains the navigation items for the resources or pages in the cluster. ....
Similar to the one Filament has in their Demo page. And yes!! I have it with the double backslash in my code but still no luck 😒
Matthew
Matthewβ€’2w ago
Ummm....unless you haven't put all the resources into the cluster folder structure...then I can't see why the sub navigation headings wouldn't show.

Did you find this page helpful?