fabrice
fabrice
FFilament
Created by fabrice on 4/25/2024 in #❓┊help
Table data in widget
Hi! I tried to reproduce "Accessing page table data in the widget" but in a livewire component, not in a filament page component (So https://filamentphp.com/docs/3.x/panels/resources/widgets#accessing-page-table-data-in-the-widget is not working for me). My idea is to : - listen an event when table component is updated (using filters) - get the "current" query builder of this table An idea to do this ?
5 replies
FFilament
Created by fabrice on 2/21/2024 in #❓┊help
MarkdownEditor feat Spatie Media Library
Hi! I tried to custom image upload of MarkdownEditor forms component and use Spatie Media Library package for all uploaded images. Following code doesn't work but on create (throw $record is null)
Forms\Components\MarkdownEditor::make('content')
->saveUploadedFileAttachmentsUsing(function (Post $record, TemporaryUploadedFile $file) {
return $record
->addMedia($file);
})
->getUploadedAttachmentUrlUsing(function (Media $file) {
return $file->getFullUrl();
})
Forms\Components\MarkdownEditor::make('content')
->saveUploadedFileAttachmentsUsing(function (Post $record, TemporaryUploadedFile $file) {
return $record
->addMedia($file);
})
->getUploadedAttachmentUrlUsing(function (Media $file) {
return $file->getFullUrl();
})
2 replies