Filament

F

Filament

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

Join

Create custom page error

Hi! When i want to create a custom page via: php artisan make:filament-page Settings I get the error:...

Scroll to bottom when opening a modal?

Hi all, I have table action to open slide over... ```php Tables\Actions\Action::make('viewDetails')...
Solution:
@toeknee spot on, I fudged this together and it does what I need ✊ ignore the debugging 👏 this is in the blade the modal calls... ``` <div x-data x-init="$nextTick(() => {...

Custom Page Table Method Edit Action passing Current Record

Hello, Is it possible to pass current record within view on custom filament page under table method? ```...

Infolist link not clickable

I have added a link to an infolist using the code from the documentation and it there are no errors its just not creating a clickable link. Sure I'm jusrt being dumb but cant see why... Thanks anybody! TextEntry::make('Add Item') ->url(fn (Order $record): string => route('createItem', ['id' => $record])),...
Solution:
```php use Filament\Infolists\Components\Actions; use Filament\Infolists\Components\Actions\Action; .....

Issue with Fieldset Visibility on Form Edit first render

Context: I'm working with Filament forms and have a fieldset (Student Information) that should only be visible when the role field is set to 4. The role is set via a Select field where I assign a role ID. The Problem: - When editing a user with an existing role ID (e.g., 4), the Student Information fieldset doesn't appear on first render until I change the role and then set it back to 4. - I expect the fieldset to be visible as soon as the form is rendered if the user’s role id is already 4, but it remains hidden until the role is selected again....

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?

Thought the record is deleted the problem is after you clicked the confirm a popup of 404|NOT FOUND wiil pop. I created a custom action but still the popup occured ...

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';...