Skip to main content
Tutorial Free

Filament: Remove Label Text in Resource Form Page

April 19, 2024
1 min read

A quick Filament tip for those who want to remove the label like "Create shop" or "Edit user" above the form.

You need to go to the Page file of the specific form, like CreateXXXXX.php or EditXXXXX.php and define the method getTitle() that would return an empty string.

app/Filament/Resources/ShopResource/Pages/CreateShop.php:

use Illuminate\Contracts\Support\Htmlable;
 
class CreateShop extends CreateRecord
{
// ...
 
public function getTitle(): string|Htmlable
{
return '';
}
}

The result afterwards:

Keep in mind that this will also remove the breadcrumbs above the label.

Also, notice that you need to override the method of getTitle() specifically. If you try to return an empty string from a $title property, it wouldn't give the same effect.


If you want more Filament examples, you can find more real-life projects on our FilamentExamples.com.

Enjoyed This Tutorial?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Comments & Discussion

E
EmJay646 ✓ Link copied!

How can it be hidden on the View Page?

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.