Filament

F

Filament

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

Join

Recommendation on strategy

Hi all, I have a Page with a table and a widget on the Page in the header. I want to do some calculations with the currently selected rows of the table but am unsure what the best way to connect the widget to the table could be. Any suggestions?

limit record

How to limit table record in a resource? I've tried: `public static function getEloquentQuery(): Builder {...
Solution:
Limiting records based on plan limit. I made a visual work around which is even better. Records are loaded but locked.

SelectAction in table header not working

``` ->headerActions([ SelectAction::make('changeConnection')->label('Change Connection') ->options(collect($this->connections)->pluck('name','id')) ->action(function(){ dd(546456);...

Spatie Team ID v Filament Tenancy timing

Hi, I'm trying to get Spatie permissions with Teams up and going, and I'm noticing an inconsistency where sometimes the 'tenant' will be passed through and sometimes I won't. I have middleware setting the teamID per documentation and other feedback I've seen. I've attempted to reimplement middleware priority, but to no effect. Using XDebug, I can see that when the middleware is called, the tenant has not yet been set; therefore, when Spatie deals with it: ```sql...

Adding a note on top of a form

I am trying to show a small note section / card on top of the form to create a resource record. Section form component works great, but I can't disable the bottom part where the fields are supposed to go. I've been looking up the docs for a while, if there is something sutable, I can't find it. Any suggestion on how to handle this?...
Solution:
I don't want to be manually styling and setting views for it either. So here is what I came up with. It is not ideal but it does the trick. 1. Publish the section.index view form the support components provider 2. Publish the components.section view from from filament forms provider. 3. In the section.index checl if the component has a schema and pass it to the form section component <x-filament::section :has-components="(bool) $getChildComponentContainer()->getFlatComponents()" ... />...
No description

Custom theme problem for tailwind v4 (Failed to find 'tailwindcss/base')

laravel 12, filament 3.3 So I was trying to change filament them and followed the doc for reference but it's showing this error ``` R:\1_Dev_G\php_laravel\laravel-livewire\ASM git:[dev] npx tailwindcss@3 --input ./resources/css/filament/shop/theme.css --output ./public/css/filament/shop/theme.css --config ./resources/css/filament/shop/tailwind.config.js --minify...

Is filament's profile page email validation broken?

The email field even accepts the string without .com or any extensions at the end. hello@hell is a valid email....
Solution:
It probably uses Laravel's email rule which is quite permissive. You maybe want to change that to email:rfc and/or email:dns

What caused the Collection::clone does not exist?

```php public static function getTableQuery() { ...

Increasing the speed on the ToggleColumn?

So i made the following checklist that you can see in the attached video. Everything working perfectly. The only thing that drives me crazy is the lag when you quickly want to sign off multiple items (something that will happen often). This is not happening when you only have 5 items but if you have a list of 20 or more items it starts being a bit slower. I tried the following: - All avatars are compressed to tiny 40x40 pixels - After the checklist item is completed, a logfile is made (and all children are also all signed off if any) but all in a job that is dispatched - the logic of signing of a item is really almost only changing some dates and changing a 0 to a 1....

Avoid Extra Requests for Select->native(false)

For some reason, when using native(false) select triggers a Livewire getFormSelectOptions request every time it's opened, even if the options are static. Is there a way to avoid these unnecessary requests while keeping native(false)?

What causes the tailwind elements not to get loaded?

This is my vite.config.js ``` import {defineConfig} from 'vite'; import laravel from 'laravel-vite-plugin'; import path from 'path';...
No description

N+1 Query for Text Column in Tables

I have this model, Domain. Domain has many Config Mappings. Config Mappings belongs to Config Directory. What I want to achieve is to:...

Validation failed Even valid email

I’m encountering a strange issue with the email address field in my form. Even though I’m entering a valid email, the validation error still shows up on the first try. But if I click the Create button again, it goes through without any problem.
No description

Problem with repeater inside action (one to many relation)

My action code: ``` class EditPricebookEntriesTableAction extends Action { public static function getDefaultName(): ?string...
No description

Issues with markdown editor being populated

Hello, I am experiencing a very weird issue which doesn't seem to be addressed anywhere, nor that anyone experienced such. I have created an edit action for the DocumentRelationManager, and when I trigger the action, slidingModal pops up as in the screenshot, with the empty content. I checked the data is correctly pulled from the database and populated (otherwise title wouldn't be populated, either). Now, if I were to click on the content textbox (I specifically have to click on the TEXTBOX part, where the cursor turns into the straight line), the content would show up. Same way, if I were to switch tab focuses (go to another tab and then back to it), it again shows the content. ...
No description

Know if the file type is a csv-UTF-8 before importing

Hello I’m using the import action in the header of the resource den list page. What I want to achieve is that when you load the file as well as detect if you upload an extension other than csv or txt you can detect that it is a csv that does not have UTF-8 format How can I do that? I am not at the computer where I work in my office so I cannot share the code of what I have done trying to achieve what I require....

Why do I get Unable to locate file in Vite manifest: resources/css/filament/manage/theme.css ?

I get an error Unable to locate file in Vite manifest: resources/css/filament/manage/theme.css. Even though my file path is correct. vite.config.js...
No description

Testing Builders

Using Builder Fields, how can I test that a builder block has certain fields visible and if specific sub-fields are required? https://filamentphp.com/docs/3.x/forms/fields/builder#testing-builders Take this mockup for example:...

How are people storing tenant-specific settings?

Using the multi-tenancy pattern described in the Filament docs (using a single database with a single Tenant model), how are people storing/configuring tenant-specific settings? Usually I'd reach for something like spatie/laravel-settings and the related Filament plugin, but it's not tenant-aware and so the settings end up being global settings (e.g. settings that I would set to control the entire site, rather than being configurable by each individual tenant). How are people addressing this problem? I'd rather not have 100 different columns on each Tenant object if I don't have to, and I'd rather use a package than roll my own if possible. I can't imagine that I'm the first person to encounter an issue like this so I'm curious how others solved it. Thanks...
Solution:
Went through this rabbit hole recently. Ended up rolling our own, as we required inheritance (platform > tenant > company). I came across https://randallwilk.dev/docs/laravel-settings/v3/basic-usage/teams during my search, which I hope does what you are looking for (you can replace team with tenant).