Filament

F

Filament

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

Join

Display view in new tab

Hi all, I have this BulkAction to print some labels: ```php BulkAction::make('print_labels') ->label('Stampa Selezionati')...

filament.php config does not apply changes to buttons

I want to add an icons by default to the edit buttons on the edit page. I set in incorrectly, so changes are not applied. I can see icons only when i manually type in ->icon but it is not a sollution. Thanks!
Solution:
I added this code to the bottom of the AdminPanelProvider and now its works
No description

Is it possible to show multiple modals on page

I have made a custom Dashboard page where i would like to display two or more action buttons. What i have done is as this first code screenshot, where i have shown custom Dashboard class. There are two methods, one to create Expense, and another to create report. The view, is simple: ```...
Solution:
Not out of the box, I think this is coming to V4
No description

Action within form to redirect to different resource create

Having a brain block probably...but how do I get an action button component inside a:
CreateAction::make()->form(..schema_array...)
CreateAction::make()->form(..schema_array...)
I want to do something like this: ``` Action::make('AddNewPersona')...

Filter with value having dash '-' is not properly working

I have a SelectFilter that uses a range format, e.g. Academic Year: 2025 - 2026, 2026 - 2027. When selecting a filter, the url parameter is like this ?tableFilters[academic_year_applying_for][value]=2025+–+2026 . So, it can't fetch query because of that +-+

Is it possible to display a different file name on FileUpload?

Hello. I am saving the original file names in a column and the filepath (with the random generated filename) in another column. Once the files have been uploaded, I'd like to know if there is any way to display the name instead of the random generated one. I am retrieving all the files the following way: ``` ->formatStateUsing(fn($record) => $record !== null ? $record->justifications->pluck('path')->toArray() : null)...
No description

Builder\Block MaxItems show error

Hi Everyone, I want to limiting the number of times a block but it shows error. I am using the pages. Here is code snippet and error message Builder::make("content[" . $locale . "]")...
No description

How to use table filters in getEloquentQuery?

Hi, is there possibility to use filters inside getEloquentQuery? I have custom case with big query inside getEloquentQuery method, that has sub queries inside and my select filter would have to add where conditions to my subqueries. I tried to do something like this: ```php public static function table(Table $table): Table...

Adding "pkl" Prefix to Admin and User Panel URLs in Laravel 11 with Filament 3

I am currently working on a Laravel 11 project using Filament 3. Right now, my website has admin and user panels, where the URLs are structured like this: url.com/admin url.com/user I would like to add a "pkl" prefix to these URLs so that they become:...

How to remove whitespace from groupAction?

Hello! Can someone help me to remove whitespace from a groupAction in a resource table? As you can see on the photo, at the right there is a bigger padding than on the left. If i remove label, filament adds default label - "Actions". Thanks!
Solution:
this workes!
No description

How can I create a ToggleColumn to change status from the list page

I've tried with multiple solution to add a ToggleColumn to list page but didn't get a proper success for this. Issues: Into the database side data is updating for the status column but in the list page toggle is not getting proper record and showing only active/inactive as a toggle. Here is my code, is ther any problem or I'm missing something or else? ...

change collapse icon

Hi i need to change the collapse icon to another icon just like the one shown when mobile vview
Solution:
in a service provider boot() method: ```php FilamentIcon::register([ 'panels::sidebar.expand-button' => 'heroicon-o-bars-3', 'panels::sidebar.collapse-button' => 'heroicon-o-bars-3',...
No description

Add table name on edit page query

```php select "products".* from "products"...

How to add or custom the function for "New Models" button

i have resources, the name is keranjang. and in the list page, that have "new keranjang" button. i want to customize the button function so the button function is not for creating.

Register Render Hook GLOBAL_SEARCH_BEFORE

it work well in desktop screen, but not styled correctly in mobile screen. FilamentView::registerRenderHook( PanelsRenderHook::GLOBAL_SEARCH_BEFORE, fn (): string => Blade::render('@livewire(\'App\Filament\Components\GlobalFilters\')'), );...
Solution:
but not styled correctly in mobile screen.
It's styled correctly. There just isn't enough space and that's your responsibility 😅...
No description

How to enable search in custom options

```Select::make('products') ->reactive() ->searchable() ->multiple() ->options(function (Get $get, Set $set, ?string $search = null) {...

Media model as a Relation Manager relation

I have a resource that uses a relation manager but direct to Media model from Spatie. But my problem is if I want to upload another media. How can I achieve it, any possible workaround to do it? ...
No description

Relationship manager directly to spatie's media table.

I am making a relationship manager directly to spatie's media table. I do not have a problem displaying it inside the form. But I want the images to disaplay as grid table on edit view. My problem is. ImageColumn make() expects an exact column or a relation for it to display. how can I achieve it?...
No description

How to change the navigation background color?

The stock navigation color is so plain and not good. How can I change it? and is it possible to put an image in the back of the panel?
Solution:

Reload a subform after select value changes

I have a select that is setting a many-to-many relationship between my room and building records. As there are many buildings with very similar names I want to show a details panel below the select with the main details of the selected building.
I have the select working and the details panel is shown after a selection is made but the vlaues are all empty.
I'm guessing I need to repopulate those fields after the select value is changed but I don't know how to achieve this. Any suggestions on this would be hugely appreciated. I'm trying to paste the code snippet for the select and details section but discord wants to make it an attachment for some reason....