Breadcrumbs not displaying correctly on resource

My resource
public static function getPages(): array
{
return [
'index' => ListBlockchains::route('/'),
'create' => CreateBlockchain::route('/create'),
'view' => ViewBlockchain::route('/{record}'),
'wallet-addresses' => ListWalletAddresses::route('/{record}/wallet-addresses'),
];
}
public static function getPages(): array
{
return [
'index' => ListBlockchains::route('/'),
'create' => CreateBlockchain::route('/create'),
'view' => ViewBlockchain::route('/{record}'),
'wallet-addresses' => ListWalletAddresses::route('/{record}/wallet-addresses'),
];
}
class ListWalletAddresses extends Page implements HasActions, HasSchemas, HasTable
{
use InteractsWithActions;
use InteractsWithSchemas;
use InteractsWithTable;

protected ?string $heading = 'Wallet Addresses';

protected static string $resource = BlockchainResource::class;

protected string $view = 'filament.resources.blockchains.pages.list-wallet-addresses';

public function table(Table $table): Table
{
return $table
->records(fn (): array => [])
->columns([

])
->filters([
//
]);

}
}
class ListWalletAddresses extends Page implements HasActions, HasSchemas, HasTable
{
use InteractsWithActions;
use InteractsWithSchemas;
use InteractsWithTable;

protected ?string $heading = 'Wallet Addresses';

protected static string $resource = BlockchainResource::class;

protected string $view = 'filament.resources.blockchains.pages.list-wallet-addresses';

public function table(Table $table): Table
{
return $table
->records(fn (): array => [])
->columns([

])
->filters([
//
]);

}
}
No description
No description
4 Replies
toeknee
toeknee2w ago
Explain what you feel is not correct.
Eskie
EskieOP2w ago
The breadcrumbs should be Blockchain > <blockchain name> > List Wallet Addresses, right? since wallet address is under blockchain.. same as the nested resource
toeknee
toeknee2w ago
No I don't think so, I think you are assuming the breacrumbs come from theroute structure, but it comes from the resource structure
Zamion101
Zamion1012w ago
For this to work you should create a relationship with Blockchain as it's parent resource and within it will be index for the relationship resource which than will show in the breadcrumb as Blockchains > [BlockChainResource $recordTitle] > List Wallet Addresses

Did you find this page helpful?