Brian.
Brian.
FFilament
Created by Brian. on 1/25/2024 in #❓┊help
Is it possible to make the Split component sticky?
The Split component is quite new and the docs about it also isn't that big. I was wondering if there already was a "hidden" way to do it? If not, I'll make it a custom feature PepeSit
1 replies
FFilament
Created by Brian. on 1/21/2024 in #❓┊help
Prepend a page (or other type) to breadcrumbs
Currently I am trying to prepend my custom page "Settings" to some resource pages. I found about the getBreadcrumbs function and tried to overwrite it by simple copying the current one and adding my item like so:
public function getBreadcrumbs(): array {
$resource = static::getResource();

$breadcrumbs = [
'/settings' => "Instellingen",
$resource::getUrl() => $resource::getBreadcrumb(),
...(filled($breadcrumb = $this->getBreadcrumb()) ? [$breadcrumb] : []),
];

if (filled($cluster = static::getCluster())) {
return $cluster::unshiftClusterBreadcrumbs($breadcrumbs);
}

return $breadcrumbs;
}
public function getBreadcrumbs(): array {
$resource = static::getResource();

$breadcrumbs = [
'/settings' => "Instellingen",
$resource::getUrl() => $resource::getBreadcrumb(),
...(filled($breadcrumb = $this->getBreadcrumb()) ? [$breadcrumb] : []),
];

if (filled($cluster = static::getCluster())) {
return $cluster::unshiftClusterBreadcrumbs($breadcrumbs);
}

return $breadcrumbs;
}
The thing is, I have a lot of resources that fall under this "Settings" page. Is there any simpler and/or more correct way, besides making a helper function, to do this? Thanks in advance!
5 replies