F
Filament4w ago
Enas

Add field to header infolist

Hello all, I want to show status field in the header of infolist table, how to make it?
No description
No description
No description
2 Replies
Bruno Pereira
Bruno Pereira4w ago
since the Section::make() function also accepts a Htmlable you can do
use Illuminate\Support\HtmlString;



public static function infolist(Infolist $infolist): Infolist
{
$var = auth()->user()?->name;

return $infolist
->schema([
Section::make(new HtmlString("<div class='flex flex-row items-center justify-between'<span>Request Details</span><span class='ms-auto'>$var</span></div>"))
]);
}
use Illuminate\Support\HtmlString;



public static function infolist(Infolist $infolist): Infolist
{
$var = auth()->user()?->name;

return $infolist
->schema([
Section::make(new HtmlString("<div class='flex flex-row items-center justify-between'<span>Request Details</span><span class='ms-auto'>$var</span></div>"))
]);
}
Enas
Enas4w ago
It works now, thank you so much
Want results from more Discord servers?
Add your server