Filament

F

Filament

Filament is a collection of beautiful full-stack components for Laravel.You can get help using it on our Discord.

Join

Database notifications panel stays open after clicking ->url() notification action in spa mode

I recently enabled spa mode on my filament admin panel, where I have noticed that the database notifications panel stays open after navigating to a resource page from a notification url action. Also it seems like the css sometimes (at random it) does some weird stuff causing some elements in the navigation sidebar to flash when clicking the notification action buttons. I have attached a screen recording of the issue. And here is the code for how one of these notifications are created: ```php...
Solution:
The bug is spa mode. All it does is set the wire:navigate on links. You would have to explicitly tell every action to close the modal with a live event listener. Long story short spa mode in livewire isn’t solid yet and if you need an actual spa then you need to build one. Otherwise let livewire do what it does. 😅

Columns\Layout\Stack - Record Spacing

Hi folks, I'm wondering if there is a way I can make the space smaller for records on the same row? I want the records to "snap" into place, so they only take up as much space as they need (not the maximum height for that row). I've attached a screenshot for reference, thanks!...
No description

How to deal with a relationship's relationship in TextInputs?

My models are as follows: Order hasMany Products which each have a belongsTo ServiceFile. In a repeater, I'm listing my Order's Products, which works, but when I try to access fields on these Products' ServiceFiles, nothing shows up. My code: ```php...

How to test modal actions?

I registered a modal action using the registerModalActions() function and when I mount the "parent" action and use the assertSee() function to check for the modal action's label I can find it just fine, but if I try to actuall call the modal action it says that no action with that name exists on my page, do I maybe have to load the action differently? This is how I'm currently trying to access it: ```php it('can use modal action', function () {...

Select::createOptionForm fill?

I have an Action with 2 wizard steps. The first step contains a Select input with a createOptionForm from another resource. How can I fill in some values to this form based on the current record? Minimal example (with some details removed for brevity): ``` Forms\Components\Select::make('assigned_user_id')...

Create Action using different forms

Anybody got any suggestions on how to go about using a different form dependent on the type of record being added. I've got a table which holds different types of records, with a load of options that get stored in a Json format as a single column. Could therefore do with a different 'form' for each option....

Create Comment - where to inject parent ID?

I was able to get a view and edit to display comments related to orders, but the 'create' button(s) aren't working because it's not carrying over the order item id. I'm not sure where or how to interject that value. When I edit the order record, it shows the comments at the bottom with a create record (action) button. I was able to track this down to the relation manager actions by playing with the ->label() method. But clicking that button pops up a modal and I'm not sure how to make it aware of the order item id....
No description

"Update" request to server every sec!

It sends this request to the server every second. How do I make it send requests every 5 seconds?
No description

Problem Dehydrated Multiple Select

I have created a form widget with two Select fields: ```php Select::make('teams') ->multiple()...
Solution:
the solution is to put in the mount() function "$this->form->fill([]);"
No description

How do I filter count columns

I have a column to display member counts of a group. ``` TextColumn::make('active_members_count') ->label('Members')...

Open a second require confirmation modal from the first require confirmation modal

Hi, I'm in Filament v3. In a resource I have an Action defined as a require confirmation. In the action method applied to the Action, I do some operations that have to be done at the confirm. After the confirm and the operations in the action method, I want to open a second modal, like a thankyou modal. To do this, I opted to create another Action with require confirmation and then defined all my stuff in that modal. My problem is, how can I open the second modal after the user confirm the first modal and my action operations are done? I can't found a real useful solution on the internet....

How to translate select values

I am using filament spatie translatable plugin. I have a simple select: ```php Select::make('unit') ->options([ 'gr' => 'g',...

many to many relationship

FILAMENT TABLE FORM FILTER ERROR: Hi everyone. I am using table filter(form filter with multiple criteria) when I do my selections. the results does not show properly and in my console have this error: (Uncaught TypeError: Cannot read properties of undefined (reading 'getElementsByClassName') at Proxy.getRecordsOnPage ) does anybody know or face this error before? Thank you...

Filament plugin as a WordPress Gravityforms alternative

I'm looking for a plugin for Filament that can act as a WordPress Gravityforms alternative. However, I would classify this as a 'form builder', but searching for 'form builder' plugins for filament leads me to (understandably) quite different plugins. I have found Lara Zeus Bolt Form builder (https://filamentphp.com/plugins/lara-zeus-bolt), and this is somewhat what i'm looking for. However; 1. It's way too complicated for normal users, whereas in GravityForms it's much easier to create a form...

Issue on Select Field with a second level relation.

Hi i write a simple Select with second level relation, and when i go to submit he give me this error ``` Forms\Components\Select::make('media.tags') ->label('Tag') ->placeholder('Seleziona')...
Solution:
->pivotData(fn($get) => ['media_id' => $get('media_id') ])
->pivotData(fn($get) => ['media_id' => $get('media_id') ])
...
No description

Navigation item bottom

How can I place a navigation item only at the bottom of the sidebar?

add multiple select

i want something like screen. do u know any good plugin for that ?
No description

Run into a problem setting up reverb for notification

Here the step i make ``` 'broadcasting' => [ 'echo' => [...

Badge color doesn't update using Enum status

For text column inside table builder, when using a badge() with status casted from Enum, the color doesnt change when the status change. For example, when then status value is changed from activated to deactivated via form, the text inside badge will update to the getLabel() value, however, the color of the badge doesnt update. ...