Filament

F

Filament

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

Join

How to do a ranking column in filament table that doesn't change?

So i want to build a ranking table with filament, where by the left most column will be called 'rank' it should go from 1 to (number of records) Then as i press the sort indicator on the other columns, it get sorted, but ranking number on the left side don't change...
Solution:
I checked and the above works for your use case. Simply add the following as the first column in your table. Tables\Columns\TextColumn::make('rank')->rowIndex(),...

responsive repeater

How to make this repeater responsive on mobile ?

Filament v2 Repeater can't detect when item deleted

How do i catch when i have deleted item from the Repeater in Filament v2 form builder ? i tried with afterStateHydrated and afterStateUpdated but it doesn't work, i don't get the dd() ```php...

Infolist has no [record()] or [state()] set.

I tried to display maps or google maps using filament-google-maps from cheesegrits. but ran into a problem that Infolist has no [record()] or [state()] set. Here is the code <?php ...

Repeater edit value with array type.

I have an array with validation rules like ```php [ [ "rule" => "required",...
No description

Added colour not working

I've added the following colours to my site in a service provider with the following code: ```php public function boot(): void {...
Solution:
You need a custom theme if you are using any custom views so you can tell tailwind to scan those files.
No description

file upload validation - file name must start with value

Is it possible to do something like this on a file upload component? this doesn't work, but it's the idea I'm going for: ```php ->rules([ function ($attribute, $value, $fail) {...

Make field read-only but also styled as if it was disabled?

Is this possible? ->readOnly() is what I want functionally but ->disabled() is what I want visually. If I use ->disabled() then the field is not submitted with the form, but if I use ->readOnly() then the field is still focusable and looks active.
Solution:
Never mind, I read the documentation for the read only field but the answer was on the documentation for the disabled field. Solution was to use ->dehydrated.

Problems with the maxItem() of the Multiple Select Component

Hey guys, could someone help me with this? My component, patrimonies, is acting up. When I click save on the form, the minItem() works as expected, showing a message that I need to insert the specified quantity, and it doesn't allow me to proceed if I don't. However, when I try to select another item, the select says I can only add 1 item.
No description

Testing Repeater

I'm testing a repeater, and for some reason I get a distinct validation error. ``` it('should show an error when the email is duplicated in the form', function () { Repeater::fake();...

Select Remove Button to Be disabled

Hi, Is there a method that can remove "X" a selected value so that there is no option to remove it just to update it by choosing another?
No description

Simpler way to have default value in infolist ?

If a value is null or empty in an infolist TextEntry, is there a neat way to specifiy a default holder? This works, but not pretty: ```TextEntry::make('personaProfileDetail.ppd_emergency_contact_relation')...

How can I add steps to the DateTime UI

minutesStep only works if you use the keyboard arrows to adjust the time. In V2 minutesStep controlled both the input and the UI....
Solution:
In v3 it uses the default browser date time field, so to force the non native input field you have to explicitly tell it that.
No description

Importer RowImportFailedException

I've created an importer that is supposed to bail if it encounters references to data that doesn't exist in my database. However, when I run a test using a CSV with 1 valid row and 1 invalid row, the exception is thrown but the importer then ends up in an infinite loop and I get multiple copies of the valid row imported until I kill the queue. Here's my resolveRecord function that is intended to throw the exception:...
Solution:
Turns out it was a simple solution. I hadn't included the RowImportFailedException type in the file and so the exception being thrown was actually a class not found exception. I didn't notice that!...

Add active filters in top of dachboard page

Hi everyone, I don't know how to display active filters in the head of the dashboard page? i'm using an action modal. Thanks

How to click all row and perform action in v2?

In v3 i do to make the users click the row and go to edit page, in v2 how can be achieved? i dont find it so far ```php ->recordUrl( fn (Model $record): string => Pages\EditCustomer::getUrl([$record->id]), );...

Using Step Form with Livewire

I am using Step Form on Action to Build 3 Step Form. I am using Livewire table in Step. In the Table every row has checkbox to select rows. I need help On final Submit How do I get back the rows value which are checked? Any idea? My Resource File. ```...
No description

Can't figure out how to add my custom livewire component into the filament livewire DOM

I have a simple CartIcon component which simply gets the count from a cart service and displays a count of items in the top nav-bar next to the user drop-down. I then load this icon in my Filament panel provider use a renderHook: ``...

Multi-tenancy: Remove tenant identifier from URL and use a field on the User model instead.

Is it possible to remove all tenant identifying information from the URL and resolves my tenant from the 'currentTeam' prop on my User model?

Modal before form is saved

I have a use case where a user can create an invoice. When the totals are not correct, I want to show a form to the user when he is saving the form (create or edit page), where the user is asked if he wants the totals to be corrected. How can I show a form upon clicking save? The modal should show these actions: "Correct" after which everything is corrected and then the form is saved. And "cancel" which closes the modal and halts the saving process....