Filament

F

Filament

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

Join

black screen on table action

when i make any table action like searching it give me a black screen
Solution:
thx guys i found the solution i changed filament to "filament/filament": "^3.2",

Unique validation on 2 or more columns

In my model migration, I have a unique constraint between 2 columns:
$table->unique(['column_1', 'column_2'])
$table->unique(['column_1', 'column_2'])
...

Action to switch form tabs dynamically

I wanted to make a Wizard-like Tabs switch with next and previous Action buttons of form . how can i implement this

401 on file uploads after switching to HTTP for localhost

livewire.js?id=13b7c601:613
POST https://localhost/livewire/upload-file?expires=1740238903&signature=e3236db37645328d0d61db125bc3240c10943eaad32e100332ddbf1b22cbdc52 401 (Unauthorized)
livewire.js?id=13b7c601:613
POST https://localhost/livewire/upload-file?expires=1740238903&signature=e3236db37645328d0d61db125bc3240c10943eaad32e100332ddbf1b22cbdc52 401 (Unauthorized)
...

error but clueless

i am getting this error but i don't know how to debug this ``` InvalidArgumentException...
Solution:
'o-magnifying-glass' do you maybe mean 'heroicon-o-magnifying-glass'

CORS problem when switching to HTTPS for local dev

Access to script at 'http://localhost/js/filament/tables/components/table.js?v=3.2.140.0' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to script at 'http://localhost/js/filament/tables/components/table.js?v=3.2.140.0' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have changed .env to https://localhost...

Hide a line in navigation group

Hi, I am looking through the docs, but can't seem to find on how to disable a line that appears when you don't use icons for each resource. The line I'm talking about is this one How to hide it?...
Solution:
The line element is the first child of a parent element with fi-sidebar-item-grouped-border so you should be able to safely target it with something like
.fi-sidebar-item-grouped-border > div:first-child {
@apply hidden;
}
.fi-sidebar-item-grouped-border > div:first-child {
@apply hidden;
}
...
No description

Customize Create page and Edit page Action Labels

how to customize the label of Create, Create & Create another, cancel button Labels in Create page, and also how to customize the label in edit page Actions

TextColumn throwing an exception for the empty ENUM value

I have an attribute called language that is often used in several tables and for now 3 language codes could be used as values. So, I created an Enum class App\Enums\Language and in the Eloquent model the attribute language is cast correctly: ``` protected $casts = [...

Create a page dynamically

How can I create a page using Filament that works like a WordPress page? I’ll try to explain better: I need to create a page called 'Service,' and then the route /service should be set up dynamically and work in the browser....

Would it be hard to move a complete Filament project to Multi-tenancy ?

I have a quite big app, almost in prod. But the project goal has evolved in last months. The customizations are not insane, but... That's what I'm using: - 2 panels - 4 roles (with shield)...

Log Translation (ActivityLog Rômulo Ramos)

How can I translate and humanize this screen? I tried using the php artisan vendor:publish And it didn't translate, even though it supports the pt-BR language. And how can I display variable labels instead of showing, for example, user.name (showing user).
Solution:
Actually i copied this guys code https://github.com/rmsramos/activitylog/pull/71 he has changed the hardcoded strings to translate files among other features
No description

Form FileUpload cancel hook

Hey there! I would like to know if it is possible to "hook" an action to a FileUpload for the cancel button... something like ->onCancelPressed... Thanks!...

Filament/Shield deployment to products throws Undefined variable $component

Today I deployed my Filament/Shield Backend to Production. But it does not run, instead throws an error, see stacktrace attached. The blade in question is the standard one from filament. I already run the usual artisan commands like view:cache, view:clear, permission:cache-reset, optimize, filament:optimize and livewire:publish I also checked my opcode caching settings according to https://abdusfauzi.com/2025/02/07/undefined-variable-component-on-laravel-livewire/ but they seem fine....

Can I get the value of a select and run a method? Not ubmitting a form.

This doen't even log after a change in the select ``` Select::make('contact.status'). // ->live() ->options(StatusEnum::class)...
Solution:
no javascript errors on browser console?

Create a dashboard page for a resource

The documents mention creating multiple dashboard. But is it possible to have a dashboard linked to a resource, So it shows up in the tab bare like the View and Edit pages? I've tried adding a custom page, and then I can navigate there through the tabs. But I'm missing features that dashboard page have access to like the filtersForm method. And also I can't get the resource tabs to show up on the custom page....

Is there a way to avoid duplicate afterStateUpdated methods ?

I have code like: ``` TextInput::make('number 1') ->live()...
Solution:
and..... simplest of all.... ``` \Filament\Forms\Components\Section::make() ->columns([...

Modal preview of form coming form blade view

Hi I am trying to work out the best way of getting form data that is not saved in to my preview modal, at the moment I have a modal with a blade view, pulling in data that is saved in the db and it is working well, but im not sure the best way to pull in data to the modal on new additions to the form that are not yet saved? In my edit application resource I have ```...

session message

I need to throw some exception that will be handled in the admin panel and on the site. I juas want to redirect back with session message, like that: ` $exceptions->render(function (ExternalServiceException $e) { return back()->with([ 'error' => 'error...',...