Filament

F

Filament

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

Join

BulkAction refresh/resetTable after queued deletion

I’ve built a custom BulkAction in Filament v4 that queues records deletions in a background job. The job dispatches fine, but I’m struggling with refreshing the table UI afterward without page reload.

Livewire component in Action modalContent? Help

Hello, im am learning FilamentPHP and for excersise i am building simple task management application. I would like to render task informations in modal. I would like to add comments option for tasks. I would like to render modal af6er adding comment....

Handling Dynamic Fields

How can I add custom fields to an existing Filament form and control showing/hiding them dynamically? Example: An admin should be able to add new fields from the panel for an existing form....
Solution:
#relaticle-custom-fields you can try this

How about DB Connection Pooling in Filament?

How about DB Connection Pooling in Filament?

Alter CSV data before import

Hey, everyone. I'm trying to import a CSV that contains orders and line items. There are also blank rows in some places in the CSV. Is there a way I can alter the CSV to remove some rows before importing? How can I check to identify if a row is an order or a line item?

Wrong `filename` shown and used in `FileUpload`

I have a custom disk where I encrypt the document at rest and using a Controller to authorize request and decrypt at rest. I am also using FileUpload Field to upload this documents. Upload, Encrypt/Decrypt and Controller works fine. In the controller I am returnin Conntent-Disposition and with filename but when FileUpload displaying the document it uses name attribute of Media which is fine if this was the problem but actuallu it just uses the last section of the url used to fetch the document. Name of the file becomes 13 which is the id of the Media record as well as the id used in the URL. ...
No description

Multi-Tenancy database notifications

Hello, I have a multi-tenant project with some users having access to multiple tenants, we have an export function in one of our resources. When the user requests an export which is queued and sends database notifications when the export is completed. But it seems to be displaying same notification across all tenants for that logged in user. Please let me know how do I make it display notifications only at the tenant dashboard where it was requested from....

Upgrading to Filament v4 – Alternative for TableRepeater emptyLabel()?

Hello, I’m currently upgrading my project to FilamentPHP v4 and I’ve been using TableRepeater by Adam Weston in my codebase. In Adam’s version, there was support for an emptyLabel() (used to set a value for the empty state). While migrating, I’m not sure what’s the best way to handle that part....
Solution:
yeah would accept a PR that adds the same methods as the table's empty state

How to transform a normal Wizard into a Vertical Wizard?

I need to transform the default Filament wizard from horizontal to vertical. How can I do that? What exactly do I need to edit?
No description

Sortable and Searchable in pivot column not working

I have a many-to-many relationship between Company and Person. The pivot table and model (CompanyPerson) has an office column that refers to another model. The data displays correctly in the table when accessing "pivot.office.name", but the ->searchable() and ->sortable() methods don’t work. What is the best way to fix this?...

Filament v4: Adding extra fields on ViewRecord page

Hi all, I have a use case where I have a ViewRecord page which shows data in a infolist. But I want to add some extra fields by calling an api. I prefer to override the method mutateFormDataBeforeFill https://filamentphp.com/docs/4.x/resources/viewing-records#customizing-data-before-filling-the-form but looks like it is never called. How can I add new fields to the infolist. ```php /** * @param array<string, mixed> $data...

Update create action labels globally

Is there any global way to update all of the CreateAction buttons labels to use "Create" instead of "New", or would I need to customize that for every resource? I have many many many resource items and am trying to avoid manually changing them all but when them to consistently say "Create..." instead of "New..." because one of my resources is "News" and "New News" looks ridiculous lol...

Is it possible to make relationship tabs vertical?

I have a MemberResource with 27 relation managers. By default these are tabs shown at the top of the page that can be scrolled left and right since they overflow beyond the screen width. However our internal team work with mice that don't have horizontal scroll 😂, so I'd like to make the tabs vertical down the right of the page. I can see that ->vertical() exists when you are building tabs from scratch, but is it possible to implement on these relationship tabs? https://filamentphp.com/docs/4.x/schemas/tabs...

Compact layout setting?

Is there a global setting that changes the margin/padding of items to a more 'compact' theme? If so, how do I set it?
Solution:
You can explain that "Filament doesn’t have a single global “compact mode” setting", but you can "globally adjust spacing (padding/margin) using custom themes and CSS utilities".

Trying to test action on specific tab

I have multiple Tab in my ViewRecord page and i want to test if an action is exists on this specific tab. How can i set the active tab using the livewire() function? ```php /* How can i set which tab is active ? */ livewire(ViewOpportunite::class, ['record' => $opportunite->id])...

How to get the live order of repeater item

Hello everyone I wonder if there is a way to get the repeater item order position inside a repeater field on reorder with buttons or drag-and-drop, regardless of the database order column, I have a repeater field ...
Solution:
solution is
$state = $get('data.steps', true);
$order = array_keys($state);
$state = $get('data.steps', true);
$order = array_keys($state);
`...

Accessing Selected Records on Page without BulkActions

I have a custom page with a table that allows users to select records. The issue is that I can’t find a way to access the selected records directly from my page. When I use BulkActions, it works fine, but that’s not the behavior I want. Here’s what I’m trying to achieve:...
Solution:
Ok i kinda found the solution that i was looking for. You can give the table a property where the selected records should be entangled on. return $table...

Making an empty RichEditor field save as null

Has anyone figured out how to make an empty RichEditor field save as null in the database? To avoid empties saving as
{"type": "doc", "content": [{"type": "paragraph", "content": []}]}
{"type": "doc", "content": [{"type": "paragraph", "content": []}]}
as those render into <p></p> so its a bit weird to check whether the value exists....

Call to a member function getRelated() on null

TextColumn::make('parentMenuItem.name') ->label('Bovenliggende item') ->placeholder('-') ->sortable(), ...