morty
morty
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
And here is the code for that demo site: https://github.com/filamentphp/demo
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
The demo app has a cluster demo
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
No description
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
I watched the video you linked again. From what I gather, this is how it's structured: There is a Group resource. The group that you're working with is called 000 Jeff's Test Group. Therefore if you want to replicate this in Filament, you'd have a GroupResource listing and upon clicking into the 000 Jeff's Test Group record, then the resource subnav would be on that specific record, not the model.
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
No description
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
Otherwise, if you're just trying to cluster things then resource sub-navigation is not what you want. Instead you want https://filamentphp.com/docs/3.x/panels/clusters
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
I'm not really following your settings example. Resource sub-navigation is done for each record of a resource. Perhaps you should be putting your sub-nav on the user resource from what it appears you're trying to achieve. Therefore when you click into a user you'd see the sub-nav.
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
class ManageAccountContacts extends ManageRelatedRecords
{
protected static string $resource = AccountResource::class;

protected static string $relationship = 'contacts';

protected static ?int $navigationSort = 2;

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

protected static ?string $navigationLabel = 'Contacts';

protected static ?string $breadcrumb = 'Contacts';

protected static ?string $title = 'Account Contacts';

protected ?string $heading = 'Account Contacts';
}
class ManageAccountContacts extends ManageRelatedRecords
{
protected static string $resource = AccountResource::class;

protected static string $relationship = 'contacts';

protected static ?int $navigationSort = 2;

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

protected static ?string $navigationLabel = 'Contacts';

protected static ?string $breadcrumb = 'Contacts';

protected static ?string $title = 'Account Contacts';

protected ?string $heading = 'Account Contacts';
}
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
class ViewAccount extends ViewRecord
{
protected static string $resource = AccountResource::class;

protected static ?int $navigationSort = 1;

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

protected static ?string $navigationLabel = 'Details';

protected static ?string $breadcrumb = 'Details';

protected static ?string $title = 'Account Details';

protected ?string $heading = 'Account Details';
}
class ViewAccount extends ViewRecord
{
protected static string $resource = AccountResource::class;

protected static ?int $navigationSort = 1;

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

protected static ?string $navigationLabel = 'Details';

protected static ?string $breadcrumb = 'Details';

protected static ?string $title = 'Account Details';

protected ?string $heading = 'Account Details';
}
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
Some code that might help you:
class AccountResource extends Resource
{
protected static ?string $model = Account::class;

protected static ?string $recordTitleAttribute = 'name';

protected static ?int $navigationSort = 1;

protected static ?string $navigationGroup = 'Resources';

protected static ?string $navigationIcon = 'heroicon-o-home-modern';

protected static ?string $navigationLabel = 'Accounts';

protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::End;

public static function getPages(): array
{
return [
'index' => Pages\ListAccounts::route('/'),
'view' => Pages\ViewAccount::route('/{record}'),
'contacts.index' => Pages\ManageAccountContacts::route('/{record}/contacts'),
'fields.index' => Pages\ManageAccountFields::route('/{record}/fields'),
'files.index' => Pages\ManageAccountFiles::route('/{record}/files'),
'notes.index' => Pages\ManageAccountNotes::route('/{record}/notes'),
'tickets.index' => Pages\ManageAccountTickets::route('/{record}/tickets'),
];
}

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewAccount::class,
Pages\ManageAccountContacts::class,
Pages\ManageAccountFields::class,
Pages\ManageAccountFiles::class,
Pages\ManageAccountNotes::class,
Pages\ManageAccountTickets::class,
]);
}
}
class AccountResource extends Resource
{
protected static ?string $model = Account::class;

protected static ?string $recordTitleAttribute = 'name';

protected static ?int $navigationSort = 1;

protected static ?string $navigationGroup = 'Resources';

protected static ?string $navigationIcon = 'heroicon-o-home-modern';

protected static ?string $navigationLabel = 'Accounts';

protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::End;

public static function getPages(): array
{
return [
'index' => Pages\ListAccounts::route('/'),
'view' => Pages\ViewAccount::route('/{record}'),
'contacts.index' => Pages\ManageAccountContacts::route('/{record}/contacts'),
'fields.index' => Pages\ManageAccountFields::route('/{record}/fields'),
'files.index' => Pages\ManageAccountFiles::route('/{record}/files'),
'notes.index' => Pages\ManageAccountNotes::route('/{record}/notes'),
'tickets.index' => Pages\ManageAccountTickets::route('/{record}/tickets'),
];
}

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewAccount::class,
Pages\ManageAccountContacts::class,
Pages\ManageAccountFields::class,
Pages\ManageAccountFiles::class,
Pages\ManageAccountNotes::class,
Pages\ManageAccountTickets::class,
]);
}
}
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
ya it's sub-resource navigation. Is setting related to the user resource in that screenshot? If not, I think you'd need to create a setting resource.
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
You can mix-and-match. I can't really answer that for you because I don't know your project. If your tabs will be related records to the resource record then use manage related records pages. Otherwise you might need custom pages.
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
No description
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
No description
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
I've got my own projects I'm working on but if you post in here I'll help when I can.
37 replies
FFilament
Created by MaxwellDan on 4/24/2025 in #❓┊help
I need customize table column
8 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
37 replies
FFilament
Created by o.m on 4/25/2025 in #❓┊help
Implementing tabs that changes the whole page
Resource sub-navigation is what you're looking for I think
37 replies