Filament

F

Filament

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

Join

Customizing Section Classes

Hello - does anyone know how to remove the gap-6 from the default Section view? I've tried ->extraAttributes(['class' => 'gap-0']) but it has no effect. The gap-6 overrides it. I've tried using !important but that didn't work either. I'm trying to avoid publishing the view and removing it completely - I only need to remove the gap from one specific section. Thank you!
Solution:
So just target the appropriate Div in a custom theme. Use extraAttributes to add a class then target the class in css with a custom theme.
No description

Custom widget JavaScript not working within View

Hi guys, I'm creating custom widget, and loading JavaScript within view. But It's not working! I tried livewire eventLister as well: ```// Run on initial load...

Cant Upload File With 401 Error.

I ran the command: php artisan storage:link. Some other information: I use Alpine OS ( Docker )...
No description

Will mounting an action keep parameters from being seen by the world?

When mounting an action in Filament PHP, are the arguments exposed to the browser (and potentially visible to a user inspecting the data) or are they strictly processed on the backend, ensuring they are not publicly visible? Source : https://github.com/filamentphp/filament/blob/e5778290382f0ba8e37657cf541884d2a2f2785b/packages/actions/src/Concerns/InteractsWithActions.php#L159 This is the method in question:...

Open the custom page in a new browser tab.

How to open a custom page in Filament in a new browser tab on click? While clicking on the "view" button it is redirecting to the filament custom page and I want to load the load the filament page in to new browser tab . ```<?php //Livewire class component ...
No description

pivotData issue

what am I missing i get this error? Method Filament\Forms\Components\Select::pivotData does not exist. ```Forms\Components\Select::make('Diets') ->relationship(name: 'diets', titleAttribute: 'name') ->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->name}") ->multiple()...

Custom Toggle

Is it possible to obtain the current record and the state of the toggle, true or false, in order to perform operations when saving or updating the form, so that based on that record and toggle state, custom operations can be performed, such as creating or editing other different models and the database? Forms\Components\Toggle::make('custom'),...
Solution:
you can work with toggle, but I think you should use some methods to customize data before filling the form and before saving it to the database Check this section for EditPage: https://filamentphp.com/docs/3.x/panels/resources/editing-records#customizing-data-before-filling-the-form...

Replicating and successRedirectUrl

Hello, I enabled multi-tenancy and I am trying to redirect to the edit form after replicating a record, I listed the routes and the one I need looks like this: GET|HEAD company/{tenant}/business-hours/{record}/edit ..................................................................................... filament.company.resources.business-hours.edit ...

The data.thumbnail.4343244 failed to upload.

I am trying to create a product through the Filament admin panel and attempting to upload a photo, but I encounter this error. Could you help me understand what might be causing this issue?

How to handle relationship in a textInput inside a table action?

I didnt want to create a fieldset only for handling the relationship.

403 | Forbidden

I am hosting a Laravel application on DigitalOcean and using Filament for the admin panel. However, when I try to log in to the admin panel, I encounter a 403 Forbidden error. I have checked the permissions and configurations but haven't been able to identify the root cause. Could you please help me understand why this is happening and how I can fix it?

Change label of the save button in edit form

How to change every filament 3 default button "save changes" label to "save", do i need to overwrite some language files? Thanks for helping!
Solution:
Hi! You can publish the actions translations file with the following command: php artisan vendor:publish --tag=filament-actions-translations. After, change the aciton labels.
No description

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...