Brian.
Brian.
FFilament
Created by Brian. on 1/21/2024 in #❓┊help
Prepend a page (or other type) to breadcrumbs
Glad I could help you with it! Eventually I did just put it in a helper function:
if (! function_exists('getSettingsBreadcrumbs')) {
function getSettingsBreadcrumbs($resource, $current_breadcrumb, $cluster)
{
$breadcrumbs = [
'/admin/settings' => "Instellingen",
$resource::getUrl() => $resource::getBreadcrumb(),
...(filled($breadcrumb = $current_breadcrumb) ? [$breadcrumb] : []),
];

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

return $breadcrumbs;
}
}
if (! function_exists('getSettingsBreadcrumbs')) {
function getSettingsBreadcrumbs($resource, $current_breadcrumb, $cluster)
{
$breadcrumbs = [
'/admin/settings' => "Instellingen",
$resource::getUrl() => $resource::getBreadcrumb(),
...(filled($breadcrumb = $current_breadcrumb) ? [$breadcrumb] : []),
];

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

return $breadcrumbs;
}
}
And then used it in Create & Edit like so:
class CreateUser extends CreateRecord
{
protected static string $resource = UserResource::class;

public function getBreadcrumbs(): array {
return getSettingsBreadcrumbs(
resource: static::getResource(),
current_breadcrumb: self::getBreadcrumb(),
cluster: static::getCluster()
);
}
}
class CreateUser extends CreateRecord
{
protected static string $resource = UserResource::class;

public function getBreadcrumbs(): array {
return getSettingsBreadcrumbs(
resource: static::getResource(),
current_breadcrumb: self::getBreadcrumb(),
cluster: static::getCluster()
);
}
}
5 replies
FFilament
Created by Chrysippus on 2/29/2024 in #❓┊help
Hide Select Dropdown depends on the Select Dropdown value?
You can make it even more compact using:
->hidden(fn ($get): bool => $get('type') == 'tier')
->hidden(fn ($get): bool => $get('type') == 'tier')
4 replies
FFilament
Created by Sourabh on 2/1/2024 in #❓┊help
Filament V3 is running slowly on windows 10/11
And disable adblocker (plus) if you have it. If you can, exchange it for another extension
6 replies
FFilament
Created by Booltje124 on 1/26/2024 in #❓┊help
Images not loading in browser
Oh wait it's singular
42 replies
FFilament
Created by Booltje124 on 1/26/2024 in #❓┊help
Images not loading in browser
Shouldn't that be a json column?
42 replies
FFilament
Created by bdm-laravel on 1/25/2024 in #❓┊help
Forms\Components\Select::make('country_id') this dropdown is lagging
I'm relatively new to Filament, I assume others might know more
25 replies
FFilament
Created by bdm-laravel on 1/25/2024 in #❓┊help
Forms\Components\Select::make('country_id') this dropdown is lagging
Yeah, it does that because it's searchable(), which means it doesn't use the native select, but uses their customizable select instead. And that needs to load in. I'm not sure if you can fix that in a way. I think that needs to be preloaded by Filament itself. Or making a completely custom select.
25 replies
FFilament
Created by bdm-laravel on 1/25/2024 in #❓┊help
Forms\Components\Select::make('country_id') this dropdown is lagging
like this?
25 replies
FFilament
Created by bdm-laravel on 1/25/2024 in #❓┊help
Forms\Components\Select::make('country_id') this dropdown is lagging
25 replies
FFilament
Created by bdm-laravel on 1/25/2024 in #❓┊help
Forms\Components\Select::make('country_id') this dropdown is lagging
Yeah you mean you see the select being initialized?
25 replies
FFilament
Created by bdm-laravel on 1/25/2024 in #❓┊help
Forms\Components\Select::make('country_id') this dropdown is lagging
Do you by any chance use the Adblocker extension?
25 replies