fabrice
fabrice
FFilament
Created by fabrice on 12/31/2024 in #❓┊help
Disable User Menu on Guest Panel
Hi! I create a guest panel (without authentication) and i want to disable user menu and replace it to an "Go to dashboard button". So In GuestPanel, i use PanelsRenderHook::TOPBAR_END hook to add my button. But i don't find a "php" solution to disabled user menu if an authenticated user go to my guest panel. My solution is with css :
.fi-panel-guest .fi-user-menu {
display: none;
}
.fi-panel-guest .fi-user-menu {
display: none;
}
There's ->visible() on menu items to show/hide item, but not for user menu. Any solution or what do you think on ->disableUserMenu() feature on panel configuration ?
2 replies
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