F
Filament2mo 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 Pereira2mo 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
EnasOP2mo ago
It works now, thank you so much
Want results from more Discord servers?
Add your server