© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
12 replies
Tjiel

How to change capitalization on model label?

Hey all a resource for my model QrCodes, in this model I have set the model label the following way:
    public static function getModelLabel(): string
    {
        return __('QR access code');
    }

    public static function getPluralModelLabel(): string
    {
        return __('QR access codes');
    }
    public static function getModelLabel(): string
    {
        return __('QR access code');
    }

    public static function getPluralModelLabel(): string
    {
        return __('QR access codes');
    }

The problem im having is that its displaying Qr Access Codes instead of QR access codes.
According to the documentation you can prevent default the default capitalization in the following way:
protected static bool $hasTitleCaseModelLabel = false;
protected static bool $hasTitleCaseModelLabel = false;

https://filamentphp.com/docs/3.x/panels/resources/getting-started#automatic-model-label-capitalization

But variable is not reconized and doesn't do anything. So my question is if anybody knows how I might solve this problem.
Getting started - Panel Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to change resource label dynamic
FilamentFFilament / ❓┊help
9mo ago
Summaries: how to change mail label
FilamentFFilament / ❓┊help
3y ago
How to change resource Button label?
FilamentFFilament / ❓┊help
3y ago
Model Label Based on User ID
FilamentFFilament / ❓┊help
3y ago