Filament

F

Filament

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

Join

Filament v4 migration: Livewire SupportValidation breaks with global dont-discover

Hi everyone, I’m migrating a project from Filament v3 to v4 and I’ve run into an issue when disabling Laravel package discovery. Environment: Laravel 12.31.1 (migrated from 11)...
Solution:
Make sure that all of filament’s providers are loaded before the livewire provider.

Test extra item actions of repeater

How do I test an item action of a Repeater? I'm currently upgrading from v3 => v4 and this test assertions is failing, complaining that it can't find the action. Previsouly I was able to apply the form the action was part of. But it seems this is no longer possible? ``` Livewire::test(PhonebookForm::class, ['groupId' => $group->getKey()]) ->assertFormFieldIsEnabled('phonebook')...
Solution:
Found it myself! assertFormComponentActionExists , assertFormComponentActionEnabled and assertFormComponentActionDisabled

I can't login with the authMiddleware

So if Authenticate::class is enabled in authMiddleware, filament won't let me log in, it just takes me back to the login page. If I comment out the Authenticate::class line, everything works fine. I attached the Admin.php below....
No description

CheckboxColumn generating no-clickable checkboxes

When I use a CheckboxColumn to show a boolean attribute, nothing happens when i click on Checkbox. When I use a ToggleColumn, the record is updated when i click. Version: 4.1...
Solution:
Removing .prevent from x-on:click.stop.prevent seems to solve the problem

Importing old project pages onto filament pages

Last year I made fully working Laravel project but it was not using filament. Now project is being continued on and my original project needs to be re-added through filament. I am making filament pages and linking them with same options as my old routes and then I comment off route for it so it goes trought filament panel like building/announcements. Page renders and some of things do work, but certain css and js wont load in. I am not sure if this is correct way of merging old project pages int...
Solution:
now that I am using one with theme it is working I think

assertCanSeeTableRecords() functions correctly?

Should this pass: "assertCanSeeTableRecords($records)" while $records->count() is zero? It does! Should this pass? "assertCanNotSeeTableRecords($records)"? It does too. Bug?

Hiding ColumnGroup conditionally

Is it possible to hide all columns within a ColumnGroup with one condition? For example:
$livewire->getTableFilterState('trashed')['value'] === false)
$livewire->getTableFilterState('trashed')['value'] === false)
Or do we need to use visible/hidden on each child column like:...

with sidebarCollapsibleOnDesktop() how to resize custom action button at navbar

Hello i want to ask how to make action button become smaller or hide when press collapse sidebar. The action button below make the sidebar bigger and not close all the sidebar How to fix this? Thank you so much before! ```<?php ...
Solution:
what about this? ```php use Filament\Schemas\Components\Html;...

How to remove the pagination per page select

How to remove the pagination per page select, and keep only the pagination or make the select native so will appear like the Select when make it ->native(false)

Selection when $state is null

This seems dirty, but works. Is this the only way automatically select an option when the state is null? If i do not do this string workaround, nothing gets selected when the state is null. ```php ->options([ '' => 'None', '1' => '1x', '1.5' => '1.5x',...

Should visible & hidden work on Custom Column?

I tried to use visible & hidden in my Custom Column, but it throws an error saying that $record is null. ```php DatePickerColumn::make('date_delayed_to') ->label('Delayed To')...

Optimize images used in RichEditor

Does anyone have any ideas on how to filesize optimize the images users insert into RichEditor? When using spatie-medialibrary I can automatically make conversions but as far as I know I can't use them in RichContentRenderer. Any other ideas? 🤔 With or without medialibrary.

Rich editor throws js error if using a custom plugin

I followed the documentation to extend the rich editor. I created a LinkRichContentPlugin ```...
Solution:
PR done 🤞🏻
No description

Filament Action: Select field value missing from $data when using multiple()

Hi everyone, I’m running into an issue with a Filament Action form. I have a Select field inside the action. When the Select is set to multiple, the selected values do not appear in the $data array after submitting. However, if I remove ->multiple(), the value is included in $data as expected....
Solution:
the relationship function is the culprit, I think they handle the saving elsewhere, try removing it and add some hardcoded options and they should appear in the dd
No description

how to use Attach Action outside relation manager?

From the title itself i want to make a button where i can attach record to a belongs to many relationship in my custom page

Authorization: view policy and ViewAny policy wont work separated

Hey Folks, Im working a Filament app. But while i'm developing my app. I noticed that the viewAny and View policy are 'connected' to each other. when ViewAny = false and View = true i cant view a specific resource item. Can someone explain me that in a simple and understandable way. The docs arent clear enough for me to understand this behaviour of my policy. ...

Filament: RepeatableEntry not showing relationship data from model

I’m trying to display data from a $section model inside a Filament RepeatableEntry. When I use TextEntry, the details show up just fine. However, when I try to show the related students with RepeatableEntry, nothing is displayed. Here’s the full code for my SectionDetails page ```class SectionDetails extends Page...
Solution:
Can you try: ```php public function mount(Section $section): void {...

Form with fields that have ->reactive and afterStateUpdated

Hello, I've just made a comparison between a code running in a v3 form and same code running in v4 form. Results are kinda disapointing ...

Livewire Update routes security....

If my understanding of livewire is correct...and it likely isn't, but anyway...a page poll or direct livewire update call (RequestPath: livewire/update), uses different routes from a regular request and can therefore bypass middleware. This can be avoided using persisted middleware settings within livewire. Is Filament v3+ handling this already, particularly for single pages? Or is there a risk that authentication middleware is being by passed by Livewire...

Disable RichEditor images

Is it possible to disable images in a RichEditor so if the user tries to drag-and-drop or copy paste content with images the editor would not add the images to the editor content?