Filament

F

Filament

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

Join

Fileupload delete image on filesystem (avatar)

I am using Breezy. The upload works as expected. When you click on the X to remove the avatar from your account it does remove the database entry. I am trying to figure out how to correctly delete the physical file as well. ``` ->avatarUploadComponent(fn () => FileUpload::make('avatar_url') ->directory('o-res/avatars')...

How add Filament to Webpage

How can I integrate Filament into the request page of a website so that I don't have to change the URL every time?

AttachAction select contains no label

I have a many to many relationship with a join table of table1_id and table2_id, but in the AttachAction select dropdown there are no labels, how can I set them? The only code I use is Tables\Actions\AttachAction::make() If I change it to use a custom form, I can see my labels, but it throws an error undefined array key recordId when I submit it ``` [...
No description

Help with custom page and progress bars

Hi, I have created a custom page which I am using to import data into the database. I was hoping to display a progress bar for each table so I can show import progress as I load each table. I'm really struggling to create a progress bar that actually works with the limited css available. I've tried: <div class="h-3 relative max-w-xl rounded-full overflow-hidden"> <div class="w-full h-full bg-gray-200 absolute"></div> <div class="w-1/2 h-full bg-green-500 absolute"></div>...

Manipulate member with a button wire:click inside a ViewField in a HasForms Page

Hi I am troubling with filtering my data inside a HasForms Page. The Page got several function for collection the correct data. It implements a ViewField. On the ViewField is a button with a wire:click attribute which calls a decrease/increase function on my Page. This function should update my specific page property e.g. a date. The point is now that everytime the increase/decrease functions are called, the member is on the initial state so that after clicking increase for example 3 times it results in just a one time increasing. How can a achive that the property could be correctly updated? Before using the HasForms Page ist was a simple laravel/blade page and here this increase/decrease mechanism works like a charm, but the requirements raised so that i need to use a HasForm Page....
Solution:
okay i have resolved it.. found out that the problem was that the property was wrong defined. in my ongoing process state it was declared as public Carbon $date; and initialized inside mount method. The mount method itself was correct, but Carbon $date should be ?Carbon $date;

canAccessPanel how make check for different panel if I use Single Login Panel

In my case I have 4 panel and 1 of them it's auth when in my checks I am check for 3 panel what I have if they assign to role must return true but I have problem $panel->id() return 'auth' panel ...
No description

Hide table column based on value of another column

How can I do this? In ->hidden(), I tried a closure passing the $record and accessing the attribute, and I tried passing Get and using $get('name'), but the first way passed null to the closure and the second told me "Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization"
Solution:
hide a table column based on a form might be possible.. but you cant hide a column per record because a table holds multiple records.. thats impossible for any table

Hello,I have a Table column like this:

``` Tables\Columns\TextColumn::make('distances.lenght') ->listWithLineBreaks() ->badge() ->prefix('km ')...

View Record Tab Navigation

I am trying to build a resource View page that has several Relation Managers, as well as a few custom sub-pages with different views/capabilities. There are a few ways to get tabbed sub-navigation on the Record View Page. I know I can use the getSubNavigation method for the ViewRecord page, and the getRelationManagers method is used to generate tabs for each relation manager....

Datetime format issue in form

On the same website but when I go to Chrome, one computer is d/m/y and the other is m/d/y. The other computer is also misaligned. Can anyone tell me where the problem is? Here is the code: Forms\Components\DateTimePicker::make('date_of_birth') ->required() ->label(__('Ngày tháng năm sinh'))...
No description

Having trouble setting up a belongs to many select

i have 3 tables, quality_control_steps, machine_centers,and a join table machine_center_quality_control_step and i can see a row in my table, but i cant seem to get the select working, it should allow me to select from all rows from the quality_control_steps table: ```...
Solution:
but it shows me a list of the machine centers instead!
because you asked for that ->relationship('machineCenters', ... filament does not know your set up, neither do I.. I'm going to make the assumption that qualityControlStepsare related to machineCenters. in which case you would need to use ->relationship('machineCenters.qualityControlSteps', 'titleColumn')...
No description

Combination Record action with Action url not working

When a table has an action that opens a url, the "recordAction" to use this action as default action when the full row is clicked is not working. ``` ->recordAction('open') ->actions([...

filament spatie tags disable new tags on input

is there a way to disable create new tag on input? i want the user select any available tag. only couple of user can add new tag. is it possible to do this?...

sortable() resets the sorting on 3rd click

Hello, I am facing this issue with sortable() columns on my tables. It sorts perfectly when I click on it once, then it toggles the direction on another click and then on 3rd click it just resets the sorting and then I have to click on it again to sort. Please watch the attached video for reference. ...
Solution:
Then on 3rd click it just resets the sorting
It's the expected behaviour. If you want to change it, I think you can overwrite the sortTable() method on the ListPage...

Get the block's key when using ->extraItemActions()

Is there anyway to access the block item's key when using custom actions in extraItemActions()? I can access the items data with getItemState() but I would need to know, what type of block it is. Thank you!...

Filament LoginResponse not overide correctly

Problem in LoginResponse when I do dd() it tigers and shows all ok...
No description

Launch the Save & Create Another action as default

Having a relation manager where there is an input for the form that use a barcode scanner. When the code is scanned the submit action is launched, the same way with enter key. We need to use the create and create another as the main action for this form. But can't get it working. Anyone has something similar? Thanks in advance,...

Filament structure question

I’m a hobby coder. I’ve talked to two potential paid helpers for this phase of my Filament project and I’m not sure about their answers. Here is what I’m trying to accomplish: An /admin page for the user. The admin page will list (among other things) specific user’s game_instances. The user can be playing multiple games at the same time, all self-contained....

Add ChartJS charts to custom page (not widget)

I want to add charts to my custom page, so I'm free to tweak layout. Since ChartJS seems fine, and it's already in Filament, I tried to use a similar approach to what I found in /vendor/filament/widget/resources/views/chart-widget.blade.php. ```php...

TailwindCSS V4 i use FluxUI and want to use Filament Table Builder

I saw that the table builder does not support the tailwindcss v4. what can i do, i cant downgrade its locked on v4.