render a filament table using blade
`Hello,
how can you create a table in a blade template.
We pass some data into a blade template and try to render a table.
Unfortunately, we are not quite sure how this should work.
The table should be displayed in a modal
how can you create a table in a blade template.
We pass some data into a blade template and try to render a table.
Unfortunately, we are not quite sure how this should work.
The table should be displayed in a modal
// RelationManager
return $table
// here's some table stuff
->actions([
Tables\Actions\ViewAction::make('openMailPreview')
->label('E-Mail-Details')
->modalContent(function (Transactions $record): View {
$details = Class::getContent(messageId: $record->messageId);
return view(
'filament.modal.mail-details',
['record' => $record, 'mail' => $details],
);
})->slideOver()
]);// RelationManager
return $table
// here's some table stuff
->actions([
Tables\Actions\ViewAction::make('openMailPreview')
->label('E-Mail-Details')
->modalContent(function (Transactions $record): View {
$details = Class::getContent(messageId: $record->messageId);
return view(
'filament.modal.mail-details',
['record' => $record, 'mail' => $details],
);
})->slideOver()
]);@php use AA\Aa\aa; /** @var Stuff $mail */ @endphp
<div style="display: flex; flex-direction: column; height: 100%">
<div style="flex-grow: 0; flex-shrink: 0">
<h2>Gesendet am:</h2>
<code>{{ $mail->sentAt->format('d.m.Y H:i:s') }}</code>
<h2>Empfänger</h2>
<code>{{ $mail->email }}</code>
<h2>Vorlagen-ID</h2>
<code>{{ $mail->templateId ?? 'Kein Template verwendet' }}</code>
<h2>HTML Vorschau</h2>
</div>
<iframe style="flex-grow: 1; flex-shrink: 1; height: 100%" srcdoc="{{ $mail->body }}"></iframe>
<div>
// render a filament table here with data from $mail
</div>
</div>@php use AA\Aa\aa; /** @var Stuff $mail */ @endphp
<div style="display: flex; flex-direction: column; height: 100%">
<div style="flex-grow: 0; flex-shrink: 0">
<h2>Gesendet am:</h2>
<code>{{ $mail->sentAt->format('d.m.Y H:i:s') }}</code>
<h2>Empfänger</h2>
<code>{{ $mail->email }}</code>
<h2>Vorlagen-ID</h2>
<code>{{ $mail->templateId ?? 'Kein Template verwendet' }}</code>
<h2>HTML Vorschau</h2>
</div>
<iframe style="flex-grow: 1; flex-shrink: 1; height: 100%" srcdoc="{{ $mail->body }}"></iframe>
<div>
// render a filament table here with data from $mail
</div>
</div>