everyone. This is my first to ask a question on this platform. I just want to ask how to customize the main heading (The title) of a page in filament 3? I created a Fisherfolk resource and in the data entry, the heading is “Create Fisherfolk”. I want to change this to “Add fisherfolk”. I have done some research and I successfully changed the heading but the breadcrumbs above it is now missing. Do have any solutions that will only affect the main heading of the page?
Note: my code is attached below. Thank you. Sorry for my bad english. not fluent tho.
This is my CreateFisherfolk.php page inside the FisherfolkResource directory.
<?php
namespace AppFilamentResourcesFisherfolkResourcePages;
use AppFilamentResourcesFisherfolkResource;
use FilamentActions;
use FilamentResourcesPagesCreateRecord;
class CreateFisherfolk extends CreateRecord
{
protected static string $resource = FisherfolkResource::class;
public function getHeader(): IlluminateContractsViewView|null
{
$title = 'Add Fisherfolk';
return view('custom.custom_header', ['title' => $title]);
}
}
This is my custom header inside views directory
<div>
<h1>{{ $title }}</h1>
</div>
Michael Amata is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.