Filament

F

Filament

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

Join

Prevent Livewire Event Refresh

I have a Table Widget that I would like to receive events when an Eloquent Model is updated, but I would like to prevent the component from refreshing the table data automatically. I have the following code blocks ``` protected function getListeners(): array...

can not access to new filament panel - fortify error

hello when I try to access my new filament panel, I got this error: Target [Laravel\Fortify\Contracts\LoginViewResponse] is not instantiable. i can't find anything in web. so can you guys help me?...

Call a function after change SelectFilter

In filters i want to call function after change the select filter as example
SelectFilter::make('myfilter')
->onChange(fn() => myCallBackFunction())
SelectFilter::make('myfilter')
->onChange(fn() => myCallBackFunction())
...

Action to a filtered table

I'm looking for a golden tip to get this working. I have a table with devices and a second tabel with the logs of the devices. In the devices table I want an action to go to a filtered logs table. So I have only the logs of that particular device. ...

Hi, i need help, im using laravel 11 en filament 3

my proyect have a model that there is a kit that cointains individual products, but in muy tables in db, kit has a waek entity called KitLinea where i put the products and how many of them, how can i show this in the table in KitResource view, i mean, showing the data kit and the prodcuts that are in another tables like an acordion or collapse mode in the table, im not finding information about it with filament

livewire component with event in form

hello everyone, I have inserted inside my form, a select and a livewire component that simply has to display a blade with data (html and css), which should update when the state of the select changes ```php ->form([...

Export action error

I followed the instructions on the website and even added databaseNotifications() in the panel, but I still can't get download notifications after I click export. I only get a notification pop-up.
Solution:
It’s due to the environment. We need to change queue_connection from database to sync.
No description

Ensuring a new record is saved and created before contents of afterStateUpdated() are executed

I have a file upload that allows for multiple uploads and depends on data in the record assosciated with the upload. I"m unsure how to make sure the resource record is created before any logic is executed inside the stateUpdated function - is there not a way to force this? This only occurs if the user hasn't saved the record before triggering an upload. I'd like to have it cleanly handle this case than force the user to save first....

How to set tooltip on table header?

I want to be able to set a tooltip on the table header. Is there any way to achieve it for now? Or I might have to implement it by myself? Im trying to search if there is a way to do it. For now, havent found it. The screenshot would be what i want to achieve....
No description

How to use a custom path with spatie media library plugin?

Anyone who has found how to use a custom directory structure with SpatieMediaLibraryFileUpload in a filament form? As stated in the filament manual, the directory() option doesn't work with SpatieMediaLibraryFileUpload. I want to use this to create a directory structure per year and month for my attachments. So for example, instead of 'public/1/abc.jpg', it would be 'public/202411/1/abc.jpg' In spatie media library there's an option to use a path generator as described here: https://spatie.be/docs/laravel-medialibrary/v11/advanced-usage/using-a-custom-directory-structure...

video

I want to add a button in infolist to toggle a boolean

custom fields user table

hi, what you guys recommend me for this? i have a php system without any framework i want to migrate to filament currently it have two tables one for admin login, one for client login...
Solution:
both approaches are possible. However, I would keep a single table and using a HasOne relationship to store the client-specific fields.

Color Progress Bar

Hello everyone, do any of you know how to change the color of the progress bar?

BelongsToMany Full Name Accessor

I have
public function courses()
{
return $this->belongsToMany(Course::class);
}
public function courses()
{
return $this->belongsToMany(Course::class);
}
...

Save Table column order

Table column order should be saved. For example ordering the Products table by Name Desc, opening an Product to edit, then going back to the table, we should have the order preserved for easier access.

Add maxlength to 255 chars on TextInput by default

For all my TextInput fields, I want to set a default maximum length of 255 characters, which is the commonly used VARCHAR length for database fields. I tried implementing this in app/Providers/AppServiceProvider.php: ```php TextInput::configureUsing(function (TextInput $input): void {...
Solution:
What you likely need to do is to provide a closure to maxLength() and only in that closure call getInputMode(). You need to imagine that ::configureUsing() is called immediately when someone does TextInput::make(). So at that point, if you call getInputMode() then the code in the configureUsing does not yet know what other methods are chained after it, so hence it doesn't work (what you also said). The solution therefore would be to fetch the getInputMode() at run-time, when the getMaxLength() function is actually being called: ```php...

Is there any key value entry but for table ?

the question is in the title i want to show json value like key value of the infolist but when i use this TextColumn::make('service.budget') ->label('Budget') ->toggleable() ->money()...

How to refresh form data?

I have a Game object which can be controlled via the GamesResource. The first screenshot shows the section with actions and status messages inside the form. The second screenshot shows part of my Game model. Currently everything works (nearly) as desired: The status messages show the correct status, the buttons apply the correct changes to the Game object. But clicking a button, for example "Next round", needs me to refresh the page manually in order to see the change of status from "Current round: 1" to "Current round: 2". ...
No description

optional login/registration

how to allow guest to be able to access my application with the ability to login/register (I will add them to the navigation bar) ? I am following filament recommendation: - Remove the default Authenticate::class from the authMiddleware() array in the panel configuration. - Remove ->login() and any other authentication features from the panel....