Filament

F

Filament

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

Join

TextColumn Setting Properties on AfterStateUpdated()

Hello, I have an issue when setting dynamic properties that are based on title. I setts them good, but when i have title on autofocus and click save it wont do it. Only on second click. I mean ever-time title is in autofocus it next click wont react it will just act like we are trying to blur... Any solution to this?...
No description

which database type is best for filament to store millions of records?

which database type is best for filament to store millions of records?
No description

How to access attributes of a selected record, without duplicate queries?

Hi, I want to display additional information of the selected company using Placeholders. But each time I use Company::find($get('company_id')) an additonal query will be fired. How can I prevent this? ```php Forms\Components\Repeater::make('excursionsCompanies') ->label(__('excursion.excursionsCompanies'))...
Solution:
->content(fn (Get $get) => static::getCompany($get('id')) ```php static function getCompany(int|string $id) { return once(fn () => Company::find($get('company_id'))?->fullAddress));...

ImportAction filling relational data from multiple columns

HI, I am making an importer for standard company table of my projects. Each company has an invoice and regular address. I saw the resolveUsing but this only allows you to resolve using the state of one field. For address relation I need to check for multiple fields. ...
No description

Filament Test Fails for Force Delete Action but Works in Browser

I'm testing a ForceDeleteAction for an organization in a Filament table builder Liveware component using Pest. The functionality works perfectly in the browser but fails during the test, with the error:
``` Failed asserting that a row in the table [organizations] does not match the attributes { "id": "9db0f9f5-e8b5-4470-9d58-98cb00c76574"...
Solution:
yes ```php livewire(Index::class) ->filterTable('trashed', 1) // make sure the trashed filtered is active ->callTableAction(ForceDeleteAction::class, $organization, ['confirmation' => 'Confirm'])...

Cant download file from storage

I have created a file in a directory using makeDirectroy(). Then Im trying to download it using storage::download(), response->file(), response->download(), I ALSO tried using controller but none of them are working either... Im very stuck and confused... I have a private storage if you're wondering ```php public function downloadDocument() {...

is it possible to get the current theme-mode: [light/dark] variable in a controller?

we are generating SVG´s and would need any information if the user is currently in light or in dark mode to set the background properly. for me the simplest way would be to get access to a variable dark=true/false - but it seems impossible, i can not find any information in session(), filament() and so on. I know there are ways to do ist with media-Queries - but this is not working for me so far. Would be glad if anyone can point me in the right direction or how to do it the right way. thank you...

404 while downloading export files

Hello. After recent composer update, I started getting 404 when try to download files created from export action. I see no errors and queue logs says it's ok, but I can't reach file
No description

Communicate between form and table

I have created a custom page and in the page I display a form and a table. How do I interactively communicate with the table from the form, basically will need filtering the table. I think I cannot use built in filters alone due to some ui challenges and also form servers another action too.

Upload File to another table and get the id

hi, somebody can help me? i'm stuck in file upload, i have table file_storages and table technologies, in file_storages table i have path column, in technologies table i have tech_pic_id column,...
No description

FileUpload Validation Messages

I am uploading to a s3 and it all works fine, for some reason the file upload validation messages are not being shown just saying error on upload. Validations are working but the validation error messages are not shown can someone tell me the reason for this issue. I have even set up my liverwire.php configuration file as well, along with php.ini
No description

Repeater - strange behaviour

I am using repeater. I have a toggle field, when on, it adds the items to the repeater. If I try to reorder them with drag&drop, items are added again. If I reorder with the buttons, everything is fine....
No description

Table UI for Checklist in Create Form

I am curious if we can convert Checklist UI into Table with checkbox UI in Filament.
No description

Hint under the label when inlineLabel(true) is used

When the inlineLabel(true) method is specified, the hint shifts to the right. However, I expected the hint to appear below the label. See the example in the image below. The first screenshot shows what I get, and the second screenshot shows what I expect. Am I doing something wrong? Code:...
No description

Wrong Pivot Values

So i've implement ulid as primary key on my table, when submit the data mysql error like this:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`cita-kita`.`blog_category_blog_post`, CONSTRAINT `blog_category_blog_post_blog_post_id_foreign` FOREIGN KEY (`blog_post_id`) REFERENCES `blog_posts` (`id`) ON DELETE CASCADE) (Connection: mysql, SQL: insert into `blog_category_blog_post` (`blog_category_id`, `blog_post_id`) values (01jenzmcnwkzh12v47xbf65vdr, 1))
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`cita-kita`.`blog_category_blog_post`, CONSTRAINT `blog_category_blog_post_blog_post_id_foreign` FOREIGN KEY (`blog_post_id`) REFERENCES `blog_posts` (`id`) ON DELETE CASCADE) (Connection: mysql, SQL: insert into `blog_category_blog_post` (`blog_category_id`, `blog_post_id`) values (01jenzmcnwkzh12v47xbf65vdr, 1))
...

Table TextColumn URL() Styles

Hello, I was wondering if there is an option to add styles or classes to this url() or a tag, on TextColumn...->url()? I was looking at structure and there are no "fi-*" classes to that a tag so got me thinking how to add it?...
No description

How can I display the delete button in bulkActions without having to select?

How can I display the delete button in bulkActions without having to select any data first? If data is selected, delete button should be clickable.

test select action inside modal

In my LeadResource, on the ListRecord page, I have a "Create" action that opens a form modal to create a new lead. The form includes a select field with an action to create a new customer on the fly. When the user creates a customer, the customer ID should be associated with the new lead. I'm trying to write a test to verify: - 1/ The new customer is created successfully. - 2/ The ID of the newly created customer matches the one associated with the newly created lead....

TinyEditor problem

Hello, my TinyEditor its not showing on form. I got this error on my console:
No description

Using Getters in forms

When using Get $get in forms, and you want to get the value of lets say a component that is AFTER the component that has the getter, it will return null. For example: ```php TextInput::make('author_name') ->label('Author') ->disabled()...