Filament

F

Filament

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

Join

Header avatar image change in filament

I am saving user images in a separate model called 'Images'. I want to display the updated profile picture in the header avatar.
No description

When to use a relation manager?

Hi everyone, I’m curious about the best practices for when to use a relation manager instead of a resource in Filament. For instance, if a model has a BelongsToMany relationship (e.g., with a Tag model), would it make sense to use a relation manager in that case? Or is it common practice to use both a relation manager and a resource for the same relationship? Any guidance on this would be appreciated!...

How to disable/remove create button?

Hi folks, I want to disable this create button so I will utilize only a table here
Solution:
Remove the CreateAction in the List Page Remove 'create' => Pages\CreateXX::route('/create') in the getPages() method of your resource...
No description

Change label font weight globally

Please if anybody know, how to change labels font weight globaly (something like configure using, for labels forms components, entry components) ?

Profile Page

Can I freely modify <app>\vendor\filament\filament\src\Pages\Auth\EditProfile.php ? won't it be affected when I update to other filament versions? ?

Format Pivot fields in Relation Manager

This is the table of my RelationManager. I have a many-to-many relation with a view properties on my pivot. I would like to add multiple pivot values together, but can't seem to find a way to do this. Let's say I have a User object with a many-to-many relation with Subscription....

Test create action form field

How to test if a field is hidden in a create action ?

how to receive a multiple data record in one table column?

I want to display data in a single column like the below image.
No description

Empty tenant login

I would like to know if it is possible to still be able to login to a panel, even if there are no tenants available. Is this already available?
Solution:
I don't thinkso you probably need to have a default global tenant.

Export action doesn't work anymore

Hello, a few months ago I developed a feature on filament 3.2 that used the ExportAction and everything worked perfectly, only since a few days I encounter the error : Class “FilamentActionsExportAction” not found Any ideas? Thanks 🙏...
No description

Repeater - toggle component instead of collapse arrow

Hi, I have repeater with items contained a few fields with Toggle (is_enabled) as "main". Is it possible to move this toggle element to repeater item header/label and collapse/expand item content depends of toggle status?...

Multiples Widget StatsOverview

Hello everyone. I have a question. How can I insert several StatsOverview type widgets? That is, I would like to place several widgets with different information so that they are in different rows....
Solution:
https://filamentphp.com/docs/3.x/widgets/stats-overview#overview php artisan make:filament-widget StatsOverview1 --stats-overview php artisan make:filament-widget StatsOverview2 --stats-overview ... ?...

How to hide placeholder of file upload field?

So I want to show some uploaded files without allowing delete or upload new files but there is this huge ugly placeholder just above, and I don't see to have anyway to hide the placeholder. If I don't set placeholder, there will be some default text, if i set placeholder to empty string, there will still be that big fat rectangular above the files even if there is no text How can I hide that big fat rectangle placeholder above the files? This is my code. Thank you...
No description

Database Notification error "operator does not exist: json ->> unknown"

Can anyone help making Database Notification works in PostgreSQL 9.2.4 ?

Widgets Same Height

These are general widgets and not charts. Wasnt sure if anyone else already had a solution created for ensuring widgets in the same row have the same height. Trying to do it as simple and clean as possible.
Solution:
```css .fi-wi-widget dl, .fi-wi-widget .fi-fo-component-ctn { @apply h-full; }...

Navigation and Dashboard

How can i only have the logo go to the dashboard and keep it dashboard form the main navigation?
Solution:
Ah, i think i just needed to add
protected static bool $shouldRegisterNavigation = false;
protected static bool $shouldRegisterNavigation = false;
to the Dashboard class and then added
->homeUrl('/app')
->homeUrl('/app')
to my panel provider class...

how to trigger notification on a custom bulkaction?

```php Tables\Actions\BulkAction::make('toggleStatus') ->label('Toggle Status') ->icon('heroicon-o-arrow-path') ->requiresConfirmation()...
Solution:
you can just move notification to action like this ```php ->action(function (Collection $records) { $records->each(function (User $user) { $user->update(['is_active' => !$user->is_active]);...

Table view suddenly be weird layout

Why my table view data be weird layout on mobile view? I check my code i using normal code for table layout view.
Solution:
never mind. I messed the css for td element. It effect all my table. Just fix it. Tq.
No description

How to change resource path from /css/ to /pkl/public/?

I'm uploading a website I built with Filament to an IIS Webserver. However, after uploading, none of the resources are being loaded properly. When I add /pkl/public to the path, the resources load correctly. How can I fix this issue?...
No description