Filament

F

Filament

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

Join

Repeater custom create function?

I can only seem to find docs on how to mutateRelationshipDataBeforeCreateUsing , but not a way to do the actual insert into the database ourselves, is this possible?

Problem with Custom rules - upload file

If I add required outside, it automatically reports an error that no file is loaded even though I have loaded it. If I put it in fn, it will skip the fn without loading the file. So where is the problem I have? FileUpload::make('cover_image') ->placeholder('ここをクリック・または JPEG ファイルをここにドラッグ&ドロップしてください') ->disk('public')...
No description

How to keep a modal open after submitting

in a resource list page i create a button that user can input a form and submit. my goal: when submitted i want the modal to stay open so user can submit another one. what i did...

replaceMountedTableAction problem

I have two identical table row actions that allow me to navigate to the next row via modals. The only difference between them is the action name. Initially, when I load the table and click "Finish," a modal opens as expected. From there, I can click "Submit and open next row" to open the next modal, and everything works fine. So I switch to the other modal every time. However, when I switch to another tab (which uses advanced tables via PresetViews) and then try to use "Submit and open next row" again, the second modal does not open. If I refresh the page, it starts working again....

Markdown Editor not loading

sometimes not loading try it protected static bool $isLazy = false; In panel RelationManager Edit
No description

How to Add Custom Dropdown Filters Inside Table Headers in Filament?

I'm working on a Filament admin panel and need to add dropdown filters inside the table headers, similar to how the search bar appears inside the column. 🔹 The client does not want to use the default Filament filters. 🔹 Instead, I need an individual dropdown inside each column header for filtering. 🔹 I can't modify the default admin panel code directly....
No description

Hide Create an action in the form of a filament

I have a code like this 'use HasAvailableLeaves; protected function getFormActions(): array...
Solution:
I have succeeded, currently I am using code like this ->hidden(fn ($livewire) => (SheetLeave::where('user_id', $livewire->data['user_id'])->first()?->available_leaves ?? 0) === 0) but will this cause any problems...

Table filter

hello everyone, currently i have a project running on filament v2, as i checked the v3 doc there is a method:
deferFilters()
deferFilters()
that allow user click the apply button to get the filter to work. is there any workaround for v2 to have this kind of functionality. I really appreciate for the help.

can we hook configureUsing after render .

Is there any way we can use configureUsing after render table for example ``` Table::configureUsing(function (Table $table){ $table->paginated([5, 10, 25, 50]);...

filtered colum value

I have table like this. I implement tahun and bulan filter but the timelines_rencana_count, timelines_realisasi_count did't work. What i miss?
Solution:
Solved. need to implement modifyqueryusing ->modifyQueryUsing(function (Builder $query, $livewire) {...

Changing the default ui-avatars.com colors

How would I go about changing the color scheme of the default ui-avatars? We are currently using background=0D8ABC&color=fff for our users and would like to match that for the default ui-avatar. Currently getting around it this way. But is this the correct way of doing it?...

form->fill()`with Selects?

Anyone know how to use $this->form->fill( [...] ) with Select fields? I need to automatically select something from the dropdown while inside a form action function....

Strange Issue with Filament and API Routes

Hi, I have encountered strange issue when i update profile password and press button in UserMenu to signout i get Route login not defined error ```...

ask about how use this package mohamedsabil83/filament-hijri-picker

can any one help me how to use this package composer require mohamedsabil83/filament-hijri-picker...

Saving resource when executing Action

Good evening, Is it possible for me to programmatically save edited resource fields before the code of an action gets executed? I can't find much in the documentation (Or I'm tired 😴 ) Reason why this is important...
Solution:
Maybe something like this could work?
->before(fn ($livewire) => $livewire->save())
->before(fn ($livewire) => $livewire->save())
...

Uploading to S3 through Rich Text Editor Fails silently

I have a Rich Text Editor field which can accept images. I have my field setup like this ```php Forms\Components\RichEditor::make('content') ->fileAttachmentsDisk('s3') ->fileAttachmentsDirectory('path/to/images')...

Hook to execute some code after Create or Update on the Form without the Model Observer

I have 2 admin panels and both a panels use the same model. I need to execute a set of code after the record is created or updated. If I use an observer, it applies to both the admin panels and I don't want that. How do I go about implementing this? Is there some sort of a hook like afterSave like with Actions (https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#lifecycle-hooks) for Forms to help achieve that?

One Single Filament Login Page For 3 or more panels based on Shield roles

I was read many info about that but anybody do not show how correctly to do it. filament Daily have just for a 2 panels admin and one more but not with a special panel for a login page like AuthPanelProvider and login() method. Also there I didn't find answer to my question I sow approach via login() fun in each panel and do redirect via closure function dose it correct? ...

Setting default on select adds a second "Uncategorized" option

When I set the default on a SelectInput it adds the value in default to the options list. So after this there are two Uncategorized options. It is not eager loading, it is loading when you select the dropdown. ``` Select::make('category') ->label('Category')...

Customize Select in Relation Manager

Hi there! I have a model with a Relation Manager, relating Product and Allergen models. What I'm trying to do is show image and description of allergen in the Select component inside the AttachAction modal of the RelationManager. Something similar to this: https://v2.filamentphp.com/tricks/render-html-in-select-options...
Solution:
It wasn't working either in a normal select. After a few tries, I've solved in a simpler way: ``` ->headerActions([ Tables\Actions\AttachAction::make()...