Filament

F

Filament

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

Join

Test Livewire on a particular resource

Hi everyone. I'm trying to test my Livewire Component who handles user shortcuts to Filament resources. Here a part of my component, where I want to keep the current resource in a computed property. How can I test my Livewire component or the value of 'currentResource' with the context of the current resource (UserResource) in mind?...

Pass data from parent modal to child

Hello, I have a usecase where I want to alert user that a specific action will dispatch unreversable data changes, and he needs to confirm it. For example, a specific department has N services with external role (for example admin on it)....
Solution:
Figured out you can get it from mountedtableactions: ```php ->fillForm(function (Component $livewire) { dd($livewire->mountedTableActionsData[0]); // Need parent data here...

Table action with form - confirmation before submit

Hello, I am trying to add confirmation (or any kind of modal action) when user clicks submit on a table action with a form. I have tried with extraModalFooterActions, that contains requiresConfirmation(), which when clicked does show the confirmation (but closes the parent modal, i thought it just displays over it?), but then cancelParentActions() doesn't work, reopening the parent modal again. ...
Solution:
inject the action ```php ->action(function (Action $action) { $action->cancelParentActions();...

is there anything like codemirror that works easily with filament?

I would like to enter some code into the database, there is a markdown field, but that's a bit different.

Need help for fileupload

Hello, i cant upload my images in local storage

How to make custom delete if the primary key is "key" not id?

This is my model ``` protected $primaryKey = 'key'; ...

Can we use custom bootstrap admin template with filament

I've purchased a bootstrap 5 admin template, can we use it with filament 3
Solution:
Filament uses Tailwind, and there doesn't seem to be an easy way to directly apply the custom theme you purchased. However, you can create a custom Filament theme and customize the CSS, similar to how you would with Bootstrap. Another option is to use your template with Filament in standalone mode, without the panel builder, and utilize components like the Table Builder and Form Builder separately....

excel custom headers, footer, and summaries.

I am building an export on an accounting module. The requirement to export the list including some custom headers. The list also require some summaries on few numeric field. This can be done in the list page but not in the Built-In Export Excel Action at the moment. Can anyone suggest how to achieve this?...
No description

How to fully customize login page? Like adding a header and making page to 2 grids?

I want to add a header on the login page and make it to 2 grids. Left opart will be the form and right part will be an image.

Route [login] not defined.

Hey gays, I been working with multiple panels and when I do "Filament::auth()->logout()" I get this error: I tried different solutions that I found but anything works for me, can I help me? I tried this solution, but not works --> https://github.com/filamentphp/filament/discussions/5226#discussioncomment-10473083 thanks...
No description

Custom registration and email verification

I want to add the phone of the user as a field inside the original registration form. I tried using a custom registration form and it worked but i dont know how to send the verification email during registration. When the user registers, he/she is redirected to the verification prompt (as i want) but the email is never delivered. If i click the "resend email" it works like charm. What gives? ``` return $panel ......
Solution:
The reason is because you override the same register function . I think based practice is remove that function and replace with code below protected function handleRegistration(array $data): Model { ...

Need help on TextColumn

```php return $table ->query( $currentTeam->users()->withPivot('role') ->get()...

Relation Managers Tab Translations

Hi there. Any idea how i can get those tab translated?
No description

add relationships to record during the creation process

I have a TagsInput::make('tags') and I want to take each of the tags and do something like $record->tags()->attach([tags]) I would need access to the created record and the data from the tags input Where is a good place to do this?...

RelationManager with relation having a morph

Ti, I have a RelationManager, and that model is related with a morphOne: `class RoundRelationManager extends RelationManager { protected static string $relationship = 'rounds';...
Solution:
That looks to be because you are using dot notations in forms. I think you want: ```php
return $form...

ExportBulkAction don't work with selected record

I've a selection of records in a relationmanager like in the pic. But the export bulk action fails all row but the ultimate selected. This is the function: ...
No description

Table Select Filters

On a table I have the following filters: When I select a Network, I can only see the switches associated with this network when I refresh the page. Is there a way to "live" update the filters?...
No description

Hide the "or sign up for an account/or sign in to your account" sections

I'm trying to hide the "or sign up for an account / or sign in to your account" sections on the Login / Register pages. I've searched both the docs and Discord without finding any solutions. I've tried using the provided registerAction() and loginAction() functions but these only allow you to manipulate the buttons themselves and not the "or" message part? Am I missing something super obvious?...
Solution:
I ended up finding a solution to this by applying custom CSS to the hook class for that section. ``` .fi-simple-header-subheading { display: none;...

$this->form->fill clears whole form

Hi folks, I have an action setup that when I click it, it will fetch data from an api. I don't want the data that has been fetched to update automatically. I use the following: ``` $this->form->fill([ 'page_views' => $Response['pageviews'],...

AWS S3: 504 error with FileUpload

What i am trying to do: I want to be able to upload larger files to my AWS S3 bucket and I am testing it locally. I can upload smaller files and have changed the max file size limit to be 500MB What I tried: I'm currently trying to upload a 400~ MB file to test but it doesn't get uploaded. ...
It gets loaded on my FileUpload