F
Filament6mo ago
arsadi

How to customize Breadcrumb label

I try to customize breadcrumb label in list page. I've tries :
//App/Filament/Resource/KaryawanResource/ListKaryawan.php
protected static ?string $title = 'Karyawan';
//App/Filament/Resource/KaryawanResource/ListKaryawan.php
protected static ?string $title = 'Karyawan';
//App/Filament/Resource/KaryawanResource.php
protected static ?string $navigationLabel = 'Data Karyawan';
protected static ?string $slug = 'karyawan';
//App/Filament/Resource/KaryawanResource.php
protected static ?string $navigationLabel = 'Data Karyawan';
protected static ?string $slug = 'karyawan';
I also try to search in documentation but only found How to disabled breadcrumb . and Blade Component - Breadcrumb . Also try to look at the ListResource methods but only found getBreadcrumbs() with return string. Is there any way to modify the breadcrumb?
No description
Solution:
Solved. I was expecting the breadcrumb will be an array and we will set in Main resource class. It turned out to be string and we can set at each resource class. like this : ```php //App/Filament/Resource/KaryawanResource.php...
No description
Jump to solution
1 Reply
Solution
arsadi
arsadi6mo ago
Solved. I was expecting the breadcrumb will be an array and we will set in Main resource class. It turned out to be string and we can set at each resource class. like this :
//App/Filament/Resource/KaryawanResource.php
protected static ?string $breadcrumb = "Karyawan";
//App/Filament/Resource/KaryawanResource.php
protected static ?string $breadcrumb = "Karyawan";
//APp/Filament/Resource/KaryawanResource/ListKaryawan.php
protected static ?string $breadcrumb = "Data";
//APp/Filament/Resource/KaryawanResource/ListKaryawan.php
protected static ?string $breadcrumb = "Data";
And it give me an exact return that I expected.
No description