Filament

F

Filament

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

Join

Default tenancy route returns 404

When redirecting a user under the default route of a tenant panel (filament.{panel}.tenant), it doesn't redirect to the appropriate page (registration/dashboard). Instead it returns a 404 page. (Also 404 on tenant registration page) I have two other panels that are not using tenancy and that have different guards if it can be of any help and they are working perfectly. I don't know if it's intended nor I understand this behaviour as the intended was working in V3. The setup is the same as the docs and the exact same I used in V3....
Solution:
I figured it was policies just after posting ...

Modify attributes of field wrappers wrapper div

I'm sorry if I described the element I want to modify confusingly in the title, but basically I want my TextInput field to not only be hidden but also have a columnSpan of 0. I tried using this ->extraFieldWrapperAttributes(['class' => ' hidden opacity-0 col-span-0']) on the TextInput, which worked fine at hiding it, but sadly the div that is outside of the data-field-wrapper still has the width of one column span, which make the layout shift in an undesired way. In the attached screenshot you can see what I mean, any help would be really apprechiated :D...
No description

Where to put custom JavaScript? `resources/js/app.js` doesn't seem to work?

I'm trying to add some custom js in my app.js file but it doesn't seem to load. I'm running npm run build after to be sure and still nothing. Even something as simple as console.log('Hello, World!'); isn't showing in the console. I do have a custom theme file but this is just for style overrides right? Or do I need to do something for JS too? To be more specific, I'm trying to enable chart.js auto colors: https://www.chartjs.org/docs/latest/general/colors.html#default-color-palette...

login page

How do I remove or change the title from the Login page?
No description

Testing table list checkbox click

What I am trying to do: I'm trying to add Pest test for Checkbox click on the ListRecords component. What I did:...

modal table and bulk actions

can we make table inside of modal box and using bulk actions? bulk actions can have another form and actions....

Issues while updating to V4

I'm trying to update to V4 beta, but I'm running into some problems. I'm following https://filamentphp.com/docs/4.x/upgrade-guide Problems so far: 1) Some styles aren't loading. I get no console errors. When I updated to Tailwind 4 (Despite not having custom css) no styles at all (Check images). 2) Table widget with a grouped query fails because filamentphp now adds order by primary_key on top of the order (And the primary key isn't in the group by)...
No description

Cannot use "::class" on null TypeError when exporting

I have a strange bug when exporting so decide to ask here to see if anyone know the fix. Here is my export code ```php...
Solution:
Try updating to the latest Filament version again

Remove All From Select Filter

I there a way to remove the All option in the select filter? I thought selectablePlaceholder(false) would do it but it hasn't.

Issues with nested resources (maybe)

Hi everyone, has anyone encountered issues with nested resources? I set up a resource for a model called PersonnelProfile and nested a resource for the Contract model within it. The resulting URL looked something like mydomain.com/personnel-profiles/2/contracts/create, but I got a 'file not found' error. However, as a test, I created a model named Profile and nested the contract there, which worked correctly. Could I be making a mistake by naming it PersonnelProfile in the first place? Maybe the...

Where would be the best place to centralize this data so it's only queried once?

I have the following dashboard: ```php class SeedDashboard extends Page { protected static ?string $navigationIcon = 'heroicon-o-chart-bar-square';...

v4 - Flicker when using a custom theme

When using a custom theme that overrides styles using the apply directive in v4 i get a slight flicker on loading when it changes from the default styles to the overriden styles. Is there any way to avoid this or maybe i am doing it wrong?
Solution:
Issue was on my side. fixed it by adding outline-transparent to the .fi-input-wrp, and then changing color on focus. Because of the transition applied to the .fi-input-wrp by default, the outline was black before turning blue, which was the issue i saw ``` .fi-input-wrp { @apply outline-transparent; &:not(.fi-disabled):not(:has(.fi-ac-action:focus)) {...
No description

Searchable column with scoped model

I've got a table on a custom page which uses a model with a scope for its query. This is the scope: ```php public function scopeCalculatedClassFrequencies(Builder $query, string|null $name = null): void {...

Testing / code covering toggled table columns

Hi all, We use feature tests for all Filament behaviour and we intend to have full 100% code coverage. This works fine in most cases, but I can't seem to cover the state() callback of a tableColumn that is toggleable()->toggledHiddenByDefault(). I see various methods to manipulate tables during your tests, such as filtering, but I can't seem to find a way to toggle columns so they are shown and thus the state() callback is called?...
No description

TimeEntry restricted to 24h format

How can I ensure the time-entry input is only rendered in 24h (ie no AM/PM options)?

Add breadcrumbs to custom page

I have been looking in to this but not found anything yet. Is there a way to add breadcrumbs to a custom page?
Solution:
Hi, I think you can extend getBreadcrumbs from Filament\Resources\Pages\Page to return an array with url as key and label as value

Multi record form

Hello, I need to display in edit form multiple records one single TextInput. What I'm trying to make is Translations page List/Edit/Delete resource. Each translation have [id, key, language_id, value, tenant_id]. Visually it MUST look like I open edit form for a KEY and there is displayed ALL records with same KEY. All records must be grouped by tenants (i manage multiple sites in single CMS). Inside record each TextInput represents one record. I have reached this with mutateFormDataBeforeFill (in comments) and with two repeaters. ``` Repeater::make('translations') ->schema([ Repeater::make('records') ->schema([ TextInput::make('value')->label(''),...

Enums for datalist attribute values

Hello Filament community, I am really liking the use of enums in Filament. I wanted to ask if I can use them in datalist attributes in the form builder too? And if so, what would be best practices at the moment? Thank you....
Solution:
What about
->datalist(fn() => collect(Status::cases())->mapWithKeys(fn ($case) => [$case->value => $case->label()]))
->datalist(fn() => collect(Status::cases())->mapWithKeys(fn ($case) => [$case->value => $case->label()]))
...

How to make password text input copyable?

I have this package installed but not working.. does anyone tried this? `use Rawilk\FilamentPasswordInput\Password; Password::make('password')...

2 step auth with code recovery v4

Errors display only after enable code recovery option ->recoverable() Maybe I'm doing something wrong? ...
No description