Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

How to remove the pagination per page select

How to remove the pagination per page select, and keep only the pagination or make the select native so will appear like the Select when make it ->native(false)

Selection when $state is null

This seems dirty, but works. Is this the only way automatically select an option when the state is null? If i do not do this string workaround, nothing gets selected when the state is null. ```php ->options([ '' => 'None', '1' => '1x', '1.5' => '1.5x',...

Should visible & hidden work on Custom Column?

I tried to use visible & hidden in my Custom Column, but it throws an error saying that $record is null. ```php DatePickerColumn::make('date_delayed_to') ->label('Delayed To')...

Optimize images used in RichEditor

Does anyone have any ideas on how to filesize optimize the images users insert into RichEditor? When using spatie-medialibrary I can automatically make conversions but as far as I know I can't use them in RichContentRenderer. Any other ideas? 🤔 With or without medialibrary.

Rich editor throws js error if using a custom plugin

I followed the documentation to extend the rich editor. I created a LinkRichContentPlugin ```...
No description

Filament Action: Select field value missing from $data when using multiple()

Hi everyone, I’m running into an issue with a Filament Action form. I have a Select field inside the action. When the Select is set to multiple, the selected values do not appear in the $data array after submitting. However, if I remove ->multiple(), the value is included in $data as expected....
Solution:
the relationship function is the culprit, I think they handle the saving elsewhere, try removing it and add some hardcoded options and they should appear in the dd
No description

how to use Attach Action outside relation manager?

From the title itself i want to make a button where i can attach record to a belongs to many relationship in my custom page

Authorization: view policy and ViewAny policy wont work separated

Hey Folks, Im working a Filament app. But while i'm developing my app. I noticed that the viewAny and View policy are 'connected' to each other. when ViewAny = false and View = true i cant view a specific resource item. Can someone explain me that in a simple and understandable way. The docs arent clear enough for me to understand this behaviour of my policy. ...

Filament: RepeatableEntry not showing relationship data from model

I’m trying to display data from a $section model inside a Filament RepeatableEntry. When I use TextEntry, the details show up just fine. However, when I try to show the related students with RepeatableEntry, nothing is displayed. Here’s the full code for my SectionDetails page ```class SectionDetails extends Page...
Solution:
Can you try: ```php public function mount(Section $section): void {...

Form with fields that have ->reactive and afterStateUpdated

Hello, I've just made a comparison between a code running in a v3 form and same code running in v4 form. Results are kinda disapointing ...

Livewire Update routes security....

If my understanding of livewire is correct...and it likely isn't, but anyway...a page poll or direct livewire update call (RequestPath: livewire/update), uses different routes from a regular request and can therefore bypass middleware. This can be avoided using persisted middleware settings within livewire. Is Filament v3+ handling this already, particularly for single pages? Or is there a risk that authentication middleware is being by passed by Livewire...

Disable RichEditor images

Is it possible to disable images in a RichEditor so if the user tries to drag-and-drop or copy paste content with images the editor would not add the images to the editor content?

Hide a table column if its in a relation manager.

How would I go about it in Filament v4? So I have ProductResource and ProductItem Resource. I have a relation manager for ProductItems in ProductView page, but since its using the same table from ProductItem, its also showing the columns of the parent (Product), which can already be seen on top on the view page, hence making it redundant.
Solution:
Found it.
->hidden(fn ($livewire) => $livewire::class === ConsumersRelationManager::class)
->hidden(fn ($livewire) => $livewire::class === ConsumersRelationManager::class)
...

MarkdownEditor will save to local disk but not S3

So this is probably a stupid question, but I'm banging my head against the wall here and I'm not really sure where else to look. I have a MarkdownEditor component that I want to accept images within. If I don't set a disk with ->fileAttachmentsDisk(), it effectively saves the file as soon as I drag the image onto the editor pane. Once it's been saved, it shows up immediately in the editor pane, exactly as you'd expect, on the local disk storage, etc. My problem is that if I try to set the component to store to the disk called "s3" by doing ->fileAttachmentsDisk('s3') on the MarkdownEditor component - which works perfectly fine throughout the rest of the Admin Panel in the form of various SpatieMediaLibraryFileUpload::disk('s3')->... elements - dragging an image on the pane does "nothing". I say "nothing" in quotes because I can see traffic in DevTools and it's doing something but no file ever actually ends up in S3, and no file shows up in the editor panel, confirming that something probably went wrong but no exceptions are being thrown....
Solution:
Ok I was able to solve the problem by doing a couple things: 1. In my config/filesystems.php file, I set 'throw' => true on the S3 disk so I could see the actual upload exception 2. The exception being thrown was (unsurprisingly) League \ Flysystem \ UnableToWriteFile but the error message went into more detail about the problem which helped: ```...

Plugin header image

Hi, I’m having an issue with the header image for my plugin in Filament, it’s not showing up. Could you please tell me what I did wrong or why it isn’t working? Here’s the plugin: https://filamentphp.com/plugins/rich-editor-fullscreen...
No description

Weird relation manager CreateAction behaviour

My relation manager's create action is constantly trying to put audit_id as (1), instead of the id of the audit (17) for which the agenda is being created. I have never ever encountered such an error and I have no idea what I am doing wrong. Can someone help me out? Here is the DB error:...

Section & manual collapsed via custom headerActions ... Is this a bug?

Hello, I have a "Section" with custom headerActions... When I click on an action, I want to change the state of the section I tried several methods, but it doesn't work....
No description

Overwrite asset_url from tenant middleware?

Is it possible to overwrite the config urls, so I can avoid cors errors? So far I tried this, but I assume tenantMiddleware is called too late or something else? ```php...

loading animation

how i can add loading animation appear in page in any process not just on the button ?

Do not run BulkAction for any records if some do not pass policy validation

Hey Filament Discord! First of all, huge thanks for all maintainers of this package. I have a question regarding bulk actions. I saw that it is possible to individually authorize them for each record, which is cool: ```php BulkAction::make('do_some_stuff')...
Next