Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Filamentphp v4 , database notifications

Im using stancl/tenancy multi database the notification sendToDatabase are always goes to the central database is there is something to make it goes the tenant context ?

Widget in the infolist

Hello Can widgets be displayed in the infolist ?...

Is there a way to listen or hook into when a user switches team?

As the title state, I am wondering if there is a way to execute some code when a user switches team in the panel. I am using the base tenancy that comes with filament.
Solution:
I don't think theres a tenant switcher persay as you can alternate between tenants without issue since we are tenant scoped, but not per tennat limited. So you could have a middleware and a current_tenant_id on the usermodel, if Auth::user()->current_tennat_id !== Filamentphp::getTenant()->id, then change it to the tennat id and log change....

unable to disable dark mode for individual components (Modal)

I tried all possible workaround without success! how to disable dark mode and force light mode when device apperance is dark?...

Table Repeater using a Lookup with Inputs to modify the line details

Scenario: Order form, with repeated order lines, the user clicks a Product from a dropdown to add the line of product details, which can consist of 10 columns of information, like "SKU", "Description" "Colour" "Material" "Price" etc. The user wants to be able to edit any of those bits of information in the Order (but just as a once-off), and not affect the original Product Lookup table. Will this work?... 0. add a Products Repeater to serve as the Order's lines to be charged for 1. Product repeater lines have a Product Select box (search for products) to work as an "SKU Lookup" ...

Tailwind CSS in Filament Packages - Best Practice?

Hello Community! I'm building a Filament form field package that uses Tailwind classes like focus-within:animate-pulse, text-gray-400, etc. The problem: users might not have these classes in their final CSS build due to Tailwind purging....
Solution:
I wouldn’t worry about the user having to do a custom theme though. Most users have one in place already. So it’s just copy paste from your readme/docs and running the build.

How to dynamicly show/hide certain wizard step based on choice?

This did not work Step::make('step') ->visible(fn ($get) => $get('show') === 'no') show field has ->live()...

MergeTag autocomplete not working in action modal

I tried using mergeTags of RichEditor field on action modal, but autocomplete is not triggered when I type {{. On filament resource page it is working ok....

🐛 Bug Report: Tenant Menu Dropdown Not Appearing

Environment: Filament: 4.x | Laravel: 12.x | Browser: Chrome/Firefox/Edge Issue: Tenant menu dropdown not appearing in Filament admin panel header, despite:...
No description

Filament V3 , How can I use filament's date time picker in A custom Filament Page

Hi folks , I need some much needed help Background : I am using filament v3 as my project was initially made it in , before i commit to fully switch to v4 I need to complete my MVP for demo What i wanna do : 1. I have a custom Filament Page ...

Multi RichEditor problem

When implementing multiple RichEditors in Create/Edit, when you have elements like tables or lists, it fails when trying to edit. Console Error: Uncaught Error: Called contentMatchAt on a node with invalid content rich-editor.js?v=4.1.10.0 Behavior: In tables: you edit correctly, but the cursor randomly appears at the beginning of the cell or jumps. In lists: the cursor randomly jumps when trying to edit....

SpatieMediaLibraryFileUpload on a related record

I have a User model and a Customer model, they have a one-to-one relationship with each other. User model implements the Spatie\MediaLibrary\HasMedia and uses the Spatie\MediaLibrary\InteractsWithMedia trait. Using SpatieMediaLibraryFileUpload component in a form in User resource works fine, it loads the media when you're in the Edit page....

How to properly use the listWithLineBreaks method from TextColumn

Heya guys, i've been playing around with the TextColumn listWithLineBreaks function paired with some JSON data. I store this data in the database:
[{"type":"LAPTOP","data":{"Merk":"Bakkers Studio Stichting","Model":"et064","CPU":"Intel i5","RAM":"16GB","Opslag":"1TB HDD"}}]
[{"type":"LAPTOP","data":{"Merk":"Bakkers Studio Stichting","Model":"et064","CPU":"Intel i5","RAM":"16GB","Opslag":"1TB HDD"}}]
...

Repeater: TextInput action always returning last record in Model $record

I have an action in a repeater that need access to the current repeater entry: ``` Repeater::make('test') ->schema([ Hidden::make('id'),...
Solution:
```php ->hintAction(fn (Get $get): Action => Action::make('display_value') ->schema([ TextInput::make('new_amount'), ])...
No description

Redirects to Favicon after Registration

I added my own favicon.. the problem is that after registration, it redirects to the favicon.. does anyone experience this?
Solution:
changing from ->favicon('favicon.co') to ->favicon(fn () => url('/favicon.ico')) fixes the issue.. i wonder why...

2 questions about brandLogo

Hi, Is it possible to add a separate brandLogo for the login page and for the Sidebar / Topbar? Also if the logo is too big it overlaps the content below. ...
Solution:
```php public function panel(Panel $panel): Panel { return $panel // ......

Best practices to improve performance

How can improve performance of resources big form or repeater form or custom page form ... Can I use computed-properties in resources to store some select options that can be limited not big of select options call it on boot function class that come from database also can get it by js https://livewire.laravel.com/docs/computed-properties....

Best way to inject a third party javascript asset just for one RelationManager form() ?

I have this code in AdminPanelProvider's boot():
FilamentAsset::register([
Js::make('stripe', 'https://js.stripe.com/v3/'),
], 'app');
FilamentAsset::register([
Js::make('stripe', 'https://js.stripe.com/v3/'),
], 'app');
...
Solution:
So you'll want lazy loading the assets. See: https://filamentphp.com/docs/4.x/advanced/assets#lazy-loading-javascript...

Create buttons disappeared

Since when i've upgraded to Filament 3, all create buttons from all resources disappeared. I have added protected static bool $shouldSkipAuthorization = true; implemented canCreate returning always true ...
Solution:
i think i've got it... sorry took a while ``` ->headerActions([ CreateAction::make(),...

MaatWebsite

If anyone is familiar with the Maatwebsite/Laravel-Excel package, I’d appreciate some help.