Filament

F

Filament

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

Join

Disable unsavedChangesAlerts() for specific resource or action.

I have an action where unsavedChangesAlerts() is causing issues and I would like to disable it only for that action. Is there any way to accomplish this without completely disabling it? I've been working along this line of thinking, but I can't seem to target the action class this way. ```php...

Using Spatie/Laravel-Data to validate Filament Forms

Is it possible to take advantage of Laravel Data to validate Filament forms?
Some projects require using Laravel Data for proper validation in different contexts (API, commands, jobs, etc), and it becomes redundant to duplicate validation rules in Filament forms for every resource. I'm looking for a way to integrate both effectively. Here's my current approach:...

Build error when compiling alpine component

I'm working on a custom file upload implementation using Filament PHP with an Alpine component. When I compile the component using esbuild, the build fails if I import the Axios library, but passes when I remove it. Breakdown: - Importing Axios causes the esbuild compilation to fail - Removing Axios library allows successful compilation...

Custom Styling Panel

We make use of Laravel Tenancy and different Panels. So for example: landlord.test -> will go to AdminPanelProvider tenant.test -> will go to TenantPanelProvider We want every tenant to be able to customize their styling of their panel, with own primary color, secondary color, logo and favicon. Is it possible to make this dynamic based on the settings of this tenant and what is the best way to get this done? For example we can store the colors and images paths in the database or is this something we can use? https://filamentglow.com/trick/dynamic-color-for-panels-per-users-1837d9c6...

Trying to modify filament form fields from custom Livewire Field component.

I want to be able to update a couple of fields in a filament 'step' based form by using a google-maps-api clickable map. I'm trying to learn livewire a bit more while doing it and am loading the map code into a livewire component, but I can't seem to figure out how you are supposed to take data coming back from the map 'click' listener event and then have filament update the lat and lng fields in the form. Since I strongly suspect all my attempts have been blind shots in the dark or are offtrack. So does anyone have any suggestions on how to do this?...

ColumnSpan

I want a schema to have 3 columns but i cant workaround how to make two inputs take 50 50 of the space.

New Record Modal does not work in Select Form

I have a Select button that draws options from the database. I also want the user to be able to create a new category in case it doesnt exist in one of the available options. However, when I press the add button, it changes into a loading icon for a bit then reverts back to the original + icon. The modal does not appear at all. Here is the code used for it: ``` Select::make('category')...
No description

Global search title

Is it possible to change Global Search title of results I need to change "Challanges" by "Hábitos" in image Thanks!...
No description

Section->headerActions->Select

Am I missing this documentation somewhere?
Solution:
You could create a custom action that extends a Forms\Components\Action, then it would work... ```php <?php ...

Hide border of Fieldset

How can I hide the border of a Fieldset
Solution:
I made a Group instead of a Fieldset

Open Modal after Action Execution to show the result

Is there any way to open a modal after execution to show bigger results like JSON/Large Text? If that's not possible, is there a way to keep the modal open when confirm button is clicked and set the value of a field in the modal form area?...

resize textarea with wire:stream

I'm trying to get the textarea to resize every time it updates with wire:stream so that the height is adjusted, but I can't get it to work. If I write it manually, it adjusts, but when it updates automatically, it doesn't. Any ideas?

Tooltips not working on Disabled Action Button.

Here is the implementation ```php DirectPrintAction::make() ->visible(fn ($record) => $record->payment_status !== PaymentStatus::PENDING) ->disabled(function () {...

How to configure breadcrumbs url on manage related records

i have 2 models, forms & responses. a form has a page where the user can manage its responses (App\Filament\Resources\FormResource\Pages\ManageResponses) ive managed to put the record name in the breadcrumb setting up, in the App\Filament\Resources\FormResource, the recordtitleatribute - protected static ?string $recordTitleAttribute = 'name'; ...
No description

Injecting $record and using ->when

$record becomes an instance of TextColumn instead of Model when using the ->when condition. Is this expected behaviour? TextColumn::make('state') ->when(fn($record) => dd($record))...
Solution:

filament-spatie-translatable plugin in admin panel v2

Hello, If I am using the filament v2 admin panel where do I put the "Setting the default translatable locales"? attached screenshot
No description

Remove Title On Pages

Hi fellas any way to remove title on pages, when i use getTitle or just $title and set it to empty string whole heading disappears?
No description

element.requestFullscreen() inside a Filament modal

Hello, i want to requestFullscreen an element inside a filament modal, but it closes the modal automatically. Any idea on how to fix that ? My action : ```php Tables\Actions\Action::make('view')...

Adding a progress bar to a filament form.

I have a form that performs an import of data that can run for a long time in some circumstances. I've got the backend sorted so it doesn't timeout but occasionally I get a timeout from Cloudflare. To solves this I thought I could add a progress bar that updates as the records are being processed but I can't figure out how to make this work. I started with a custom field that is has a html progress bar in it and linked that to a progress variable in the backend. But I can't seem to get it t...
Next