Filament

F

Filament

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

Join

Right way to exclude specific enum options within ->options?

Say you have a column in your model casted as an Enum. The enum class has getLabel, getColor, getIcon implemented. Doing just the following in a forms select/togglebutton/etc component:...

Filtering data taking too long with huge records

Hello guys, I'm new to filament and I'm experiencing a huge delay when filtering the data, I looked online but couldn't find anything helps, and I don't know why this issue happening, please note that It's already being deployed to the server and the server memory limit is 512 using PHP version 8.2. I hope the video explain the struggle...

How to Disable Table Polling in a Header Action on a Resource List Page?

I'm working with Filament and trying to disable polling for a resource table when a header action is triggered. However, my approach doesn't seem to work.
Here’s my setup:
In MyResource, I define the table with polling enabled: ...

Before form is filled, any function?

Hi, In a RelationManager: ` public function form(Form $form): Form...

How to stop table refreshing when using a ToggleColumn?

I have a table that is a little show to load, 3-4s. We use the deferLoading method and is ok for now while we work on some database design issues. There are a few Toggle Columns, however when clicked there is a 3-4s delay as the table refreshes. Is there anyway to stop the table refreshing when the toggle state changes?

Share data from `CreateRecord::handleRecordCreation` to `getRedirectUrl`

I'm contacting the payment processor within handleRecordCreation to retrieve a redirect url. How can I pass that url to getRedirectUrl so the user is automatically redirected to the payment page? 🤔 Alternatively if I contact the processor in afterCreate is it possible to redirect the user from there?...
Solution:
just call redirect()->to('Intended url here') within the afterCreate()

Return Exception from handleRecordCreation

How can I return some visible error for the user from a validation or other exception that happened in protected function handleRecordCreation(array $data): Model? https://filamentphp.com/docs/3.x/panels/resources/creating-records#customizing-the-creation-process...

Float function creates an column where the datatype is double

So I'm creating a table in in my database for charts that I want to display. When I run this migration (see code below) and look in the database (see picture) it says in the datatype column that it's an double. I know how to fix the problem but it's in: "/vendor/laravel/framework/src/Illuminate/Database/Schema"...
No description

Error 503 service unavailable

i dont know what happen, after i open my prject again i got error 503, before all is ok, but after i check again the app is broke, i already delete vendor and composer install
Solution:
Did you run php artisan down? Try running php artisan up. If that doesn’t help: Check the Laravel log
No description

Reactivity doesn't work on the frontend when using CheckboxList

I have this checkbox list that has 4 options, and the last one says "None of the above". Here's the logic of the checkboxlist, if i selected 1-3 options, and then clicked the "none of the above", it should uncheck the options and only check the "none of the above". So if the current checked is "none of the above", and I selected the other 3 options, it should automatically uncheck the "none of the above". The code i made is already working, HOWEVER, it's only working on the backend, and not in the display. The $state (in the backend) has the correct values, but in the frontend/html-view, it's showing the wrong checkboxes. ```...

Method Filament\Forms\Components\CheckboxList::allowHtml does not exist.

It's literally on the docs https://filamentphp.com/docs/3.x/forms/fields/checkbox-list ``` use Filament\Forms\Components\CheckboxList; ...
Solution:
Ahhh, i did composer update and it worked.

hidden text entry on modal

Dear all, in infolist have some text entries, on the record viewPage is OK, but I'm looking for solution to hide these entries on modal view of record infolist. Anybody know how ?...
Solution:
For future if somebody will looking for something similar ... i found solution
->visible(fn($livewire) => $livewire instanceOf ViewRecord)
->visible(fn($livewire) => $livewire instanceOf ViewRecord)

How searchable() works on form enum Select?

My Select is defined like this: Select::make('country') ->label('Country') ->required()...
No description

Custom page with Infolist and ->badge

Hello, I'm trying to build a custom page with a infolist, where I want my statuses in their own section grouped by the group column I got that working, but now I'm trying to make the TextEntry in to a badge with the status color, but neither badge or color is being applied. ```
return TextEntry::make( "statuses.{$status['id']}.name" )...

Need action that open url and refresh table

I desperately need action that open url, update status, and refresh table together after status updated?

Navigation Header not fixed when scrolling

When i scroll down on my Filament App the navigation header is not fixed and scrolls up as shown in the pictures. How do I fix this?
Solution:
Are you using debug bar? Its injection can affect this. Which shouldn’t be a problem since it shouldn’t be active in production.
No description

How poll just one column in a table?

Hi, everyone. I'm trying to use reverb to refresh one column (computed column, not directly from database) I'm failed then, reading documentation, I seen poll method and, even if this is not my prefered aproach, is a functional aproach for me. Just poll data every 30s to get fresh values, but... The whole table? Any idea to get something like poll(columns: ['column', 'column' ]) I tryed my best to write this in english 🫣...
No description

Get data from screenshot

I am trying find solution how convert data statistics from screenshots to db or exel, any idea/directions how it can be done ? Example of potential screenshot GPT can't get data correctly 🥲...
No description

LOOKING FOR FULLSTACK DEVELOPER

🚀 I am looking for developers to contribute to various aspects of my work. This role requires: - Experience or willingness to support in technical interview is big plus - Strong technical expertise - Compensation: $70/hour 📢 A quick call is necessary before getting started....
Next